A common log sample.

# Log4j configuration file.
log4j.rootCategory=INFO, Console, X
log4j.logger.com.fsillc.remote.server=DEBUG, R
log4j.logger.com.fsillc.remote.server.CalculatorImplementation=DEBUG, Y
log4j.logger.com.fsillc.remote.server.FSINamingServer=DEGUG, Z
log4j.logger.com.fsillc.tabs.defaults.RemoteCalculatorProvider=DEGUG, W

# Available levels are DEBUG, INFO, WARN, ERROR, FATAL

#
# A1 is a ConsoleAppender
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%-5p - %F(%L): %m%n


log4j.appender.X=org.apache.log4j.RollingFileAppender
log4j.appender.X.File=c:\\jndi_log\\gui.log
log4j.appender.X.layout=org.apache.log4j.PatternLayout
log4j.appender.X.layout.ConversionPattern=%-5p [%t][%d] - %F(%L): %m%n
log4j.appender.X.MaxFileSize=10000KB
log4j.appender.X.MaxBackupIndex=20


log4j.appender.Y=org.apache.log4j.RollingFileAppender
log4j.appender.Y.File=c:\\jndi_log\\calc.log
log4j.appender.Y.layout=org.apache.log4j.PatternLayout
log4j.appender.Y.layout.ConversionPattern=%-5p [%t][%d] - %F(%L): %m%n
log4j.appender.Y.MaxFileSize=10000KB
log4j.appender.Y.MaxBackupIndex=20


log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=c:\\jndi_log\\jndi.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%-5p [%t][%d] - %F(%L): %m%n
log4j.appender.R.MaxFileSize=10000KB
log4j.appender.R.MaxBackupIndex=20

log4j.appender.Z=org.apache.log4j.RollingFileAppender
log4j.appender.Z.File=c:\\jndi_log\\namingServer.log
log4j.appender.Z.layout=org.apache.log4j.PatternLayout
log4j.appender.Z.layout.ConversionPattern=%-5p [%t][%d] - %F(%L): %m%n
log4j.appender.Z.MaxFileSize=10000KB
log4j.appender.Z.MaxBackupIndex=20

log4j.appender.W=org.apache.log4j.RollingFileAppender
log4j.appender.W.File=c:\\jndi_log\\calcProvider.log
log4j.appender.W.layout=org.apache.log4j.PatternLayout
log4j.appender.W.layout.ConversionPattern=%-5p [%t][%d] - %F(%L): %m%n
log4j.appender.W.MaxFileSize=10000KB
log4j.appender.W.MaxBackupIndex=20

 

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