log4j配置

log4j.rootLogger=info,stdout,R
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.

#输出  时间,类名,方法名,LOG行次,级别,线程
#log4j.appender.stdout.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss} %C:%M:%L %5p %t]-- %m%n

log4j.appender.stdout.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss} %C:%L]-- %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=..\\logs\\emap.log
log4j.appender.R.MaxFileSize= 1024KB

# Keep one backup file
log4j.appender.R.MaxBackupIndex=1000

log4j.appender.R.layout=org.apache.log4j.PatternLayout
#log4j.appender.R.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss} %C:%L %5p %t]-- %m%n
log4j.appender.R.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss} %C:%L]-- %m%n

你可能感兴趣的:(apache,C++,c,log4j,C#)