标签:release eve this levels group .com oge inf sys
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <version>${spring.boot.version}</version> <exclusions> <exclusion> <artifactId>log4j-over-slf4j</artifactId> <groupId>org.slf4j</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-log4j</artifactId> <version>1.3.8.RELEASE</version> </dependency>
log4j.properties
project=datasight logdir=/home/logs/${project} ### set log levels ### log4j.rootLogger = info,stdout # config this project appender,log level:info,error # log4j.logger.com.ts.report = info,error,bizInfo,bizError ### 控制台输出 ### log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{yyy-MM-dd HH\:mm\:ss} %5p %c{1}\:%L - %m%n # info log everyday file# log4j.loger.bizInfo = info,bizInfo log4j.appender.bizInfo=org.apache.log4j.DailyRollingFileAppender log4j.appender.bizInfo.File=${logdir}/info.log log4j.appender.bizInfo.layout=org.apache.log4j.PatternLayout log4j.appender.bizInfo.DatePattern=‘_‘yyyy-MM-dd log4j.appender.bizInfo.layout.ConversionPattern=%d{yyy-MM-dd HH\:mm\:ss} %5p %c{1}\:%L - %m%n log4j.appender.bizInfo.Threshold=INFO #log4j.additivity.bizInfo=false ## error log ## log4j.loger.bizError = info,bizError log4j.appender.bizError = org.apache.log4j.DailyRollingFileAppender log4j.appender.bizError.File = ${logdir}/error.log log4j.appender.bizError.layout = org.apache.log4j.PatternLayout log4j.appender.bizError.DatePattern=‘_‘yyyy-MM-dd log4j.appender.bizError.layout.ConversionPattern =%d{yyy-MM-dd HH\:mm\:ss} %5p %c{1}\:%L - %m%n log4j.appender.bizError.Threshold = ERROR #log4j.additivity.error=false
标签:release eve this levels group .com oge inf sys
原文地址:http://www.cnblogs.com/qixing/p/7763582.html