log4j问题
程序员文章站
2022-07-15 14:42:35
...
当遇到:
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.ConvertUtils).
则在WEB-INF/classes文件夹下添加:log4j.properties
内容如下:
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.ConvertUtils).
则在WEB-INF/classes文件夹下添加:log4j.properties
内容如下:
log4j.rootLogger=DEBUG,stdout,R log4j.logger.org=ERROR, A1 log4j.logger.com.gc.action=DEBUG,A2 log4j.appender.A1=org.apache.log4j.RollingFileAppender log4j.appender.A1.File=org.log log4j.appender.A1.MaxFileSize=500KB log4j.appender.A1.MaxBackupIndex=50 log4j.appender.A1.Append=true log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} - [%p] [%C{1}] - %m%n log4j.appender.A2=org.apache.log4j.RollingFileAppender log4j.appender.A2.File=gc.log log4j.appender.A2.MaxFileSize=500KB log4j.appender.A2.MaxBackupIndex=50 log4j.appender.A2.Append=true log4j.appender.A2.layout=org.apache.log4j.PatternLayout log4j.appender.A2.layout.ConversionPattern=%d{ISO8601} - [%p] [%C{1}] - %m%n #--------------------stdout-------------------------------- log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout # Pattern to output the caller's file name and line number. log4j.appender.stdout.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss} %c - %m%n #--------------------R-------------------------------- #log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R=org.apache.log4j.DailyRollingFileAppender #this log file will be stored in web server's /bin directory,modify to your path which want to store. log4j.appender.R.File=gf.log #log4j.appender.R.datePattern='.'yyyy-MM-dd-HH-mm log4j.appender.R.datePattern='.'yyyy-MM-dd log4j.appender.R.append=true ## Keep one backup file log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss} %c - %m%n #[%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
上一篇: Wicket生成ExtJS的组件(DateField)
下一篇: shellcode编码
推荐阅读
-
域名和cookie问题(域名后缀)
-
Bootstrap modal 多弹窗之叠加引起的滚动条遮罩阴影问题
-
解决eclipse中egit中的cannot open git-upload-pack问题
-
Adobe Dreamweaver CC完美破解补丁amtlib.dll 解决进程CPU占用高问题
-
illegal opcode 红屏报错(hp 360 G6安装win2003)问题解决方法
-
企业在做微博营销的过程中需要注意四大问题
-
在笔记本中Virtual PC 2007的问题及解决方案
-
自媒体营销企业微博运用应该注意的问题
-
Mysql数据库从5.6.28版本升到8.0.11版本部署项目时遇到的问题及解决方法
-
微信小程序之onLaunch与onload异步问题详解