log4j.properties文件配置的一种方式

来源:互联网 发布:小程序授权登录源码 编辑:程序博客网 时间:2024/05/21 15:01
# This is the configuring for logging displayed in the Application Serverlog4j.rootCategory=DEBUG,stdout,logfile #stdout configurelog4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.layout=org.apache.log4j.PatternLayoutlog4j.appender.stdout.layout.ConversionPattern= %d %p [%c] - <%m>%nlog4j.appender.stdout.Target=System.outlog4j.appender.stdout.Threshold=INFO#logfile configurelog4j.appender.logfile=org.apache.log4j.DailyRollingFileAppenderlog4j.appender.logfile.File=${webapp.root}/WEB-INF/logs/sobeyvmsadapter.loglog4j.appender.logfile.DatePattern = '.'yyyy-MM-dd#log4j.appender.logfile.File=/opt/wacos/ctms/meservice/log/SobeyVMSAdapter.loglog4j.appender.file.encoding=UTF-8#log4j.appender.logfile.File=/WEB-INF/logs/SobeyVMSAdapter.log#日志文件的路径和名称#log4j.appender.R.File=./../logs/SobeyVMSAdapter.loglog4j.appender.logfile.MaxFileSize=10Mlog4j.appender.logfile.MaxBackupIndex=100log4j.appender.logfile.layout=org.apache.log4j.PatternLayoutlog4j.appender.logfile.layout.ConversionPattern= %-d{yyyy-MM-dd HH\:mm\:ss} [%c]-[%p] %m%nlog4j.appender.logfile.Threshold=INFOlog4j.appender.logfile.Append=truelog4j.logger.com.opensymphony.xwork2=ERROR,stdout, logfilelog4j.logger.org.hibernate.cfg=ERROR,stdout, logfilelogging.level.root=INFOlogging.level.org.springframework=ERRORlogging.level.org.hibernate=ERRORlogging.level.org.hibernate.tool.hbm2ddl=ERRORlogging.level.org.hibernate.SQL=ERRORlogging.level.springfox.documentation=ERROR#debug log for springlog4j.logger.org.springframework=DEBUG# debug log for ibatislog4j.logger.java.sql.Connection=DEBUGlog4j.logger.java.sql.Statement=DEBUGlog4j.logger.java.sql.PreparedStatement=DEBUGcatalina.org.apache.juli.FileHandler.level = ALL#log4j.rootLogger=WARN,stdout,filelog4j.appender.file.Append=falseImmediateFlush=true

原创粉丝点击