Struts2 ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging
来源:互联网 发布:itunes软件下载到哪里 编辑:程序博客网 时间:2024/04/30 06:46
INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
原因:log4j2的配置文件没有导入
尝试导入log4j.properties ,但并不行
需要导入log4j2.xml
下面给出示范:
然后直接导入你项目的src,eclipse和IDEA均会把其配置到WEB-INF的classes下
下面是我的log4j2的配置
<?xml version="1.0" encoding="UTF-8"?><Configuration> <Appenders> <Console name="STDOUT" target="SYSTEM_OUT"> <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> </Console> <RollingFile name="RollingFile" fileName="logs/strutslog1.log" filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz"> <PatternLayout> <Pattern>%d{MM-dd-yyyy} %p %c{1.} [%t] -%M-%L- %m%n</Pattern> </PatternLayout> <Policies> <TimeBasedTriggeringPolicy /> <SizeBasedTriggeringPolicy size="1 KB"/> </Policies> <DefaultRolloverStrategy fileIndex="max" max="2"/> </RollingFile> </Appenders> <Loggers> <Logger name="com.opensymphony.xwork2" level="WAN"/> <Logger name="org.apache.struts2" level="WAN"/> <Root level="warn"> <AppenderRef ref="STDOUT"/> </Root> </Loggers></Configuration>
如果要指定生成日志文件,可以参考以下
然后其生成在:
1 1
- Struts2 ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging
- ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only err
- ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only err
- Struts2.5 ERROR StatusLogger No log4j2 configuration file found. Using default configurati
- ERROR StatusLogger No log4j2 configuration file found.的解决方法
- ERROR StatusLogger No log4j2 configuration file found. 找不到日志配置文件
- Hive 查询报错:No log4j2 configuration file found. Using default configuration: logging only errors to th
- SSH Exception 2017.3.27-3 ERROR StatusLogger No log4j2 configuration file found
- 测试中出现ERROR StatusLogger No log4j2 configuration file
- Error:Configuration with name 'default' not found.
- Error:Configuration with name 'default' not found.
- Error:Configuration with name 'default' not found.
- Error:Configuration with name 'default' not found.
- Error:Configuration with name 'default' not found.
- ERROR StatusLogger Log4j2 could not find a logging implementation.
- Jenkins ERROR: No artifacts found that match the file pattern "build/*/*.ipa". Configuration error
- no default or UI configuration directive found boot:
- no default or UI configuration directive found问题解决
- Android之自定义最简单的竖向引导页
- 利用电动自行车后轮无刷直流电机霍尔信号的一种测速方法
- Java基础练习
- ob缓存实例
- docker 给运行中的容器设置端口映射
- Struts2 ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging
- 注册页面转向及前台数据校验
- 将一个表单提交给多个页面的方法
- Activiti 学习笔记五:流程变量
- 《C++编程规范——101条规则、准则与最佳实践》笔记006
- codeforces-366#--A
- JavaScript中的严格模式
- $.each(json,function(index,item){ }); jquery遍历
- 祖孙询问