2011年4月3日星期日

log4j 配置文件说明

log4j 配置文件说明
#
# log4j.properties
#
# Configures Log4j as the Tomcat system logger
# using a DatedFileAppender.
#
#
# Configure the logger to output ERROR or INFO level messages into
# a Tomcat-style rolling, dated log file ("tomcat.DATE.log").
#
#log4j.rootLogger=ERROR, T
log4j.rootLogger=INFO, T
#
# Configure the appender "T".
#
# Note that the default file name prefix is being overridden
# to be "tomcat." instead of "application.".
#
log4j.appender.T=biz.minaret.log4j.DatedFileAppender
log4j.appender.T.layout=org.apache.log4j.PatternLayout
log4j.appender.T.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
#
# If you don't want to use the DatedFileAppender default values
# seen below, uncomment that line and change the setting.
#
# Directory: If the directory name does not start with a leading slash,
# the directory name will be relative to your Tomcat home directory.
#log4j.appender.T.Directory=logs
#
# Prefix: The log file name prefix.
#log4j.appender.T.Prefix=application.
log4j.appender.T.Prefix=tomcat.
#
# Suffix: The log file name suffix.
#log4j.appender.T.Suffix=.log
#
# Append: true to append when opening a log file (good when restarting
# Tomcat) or false to truncate.
#log4j.appender.T.Append=true
#
# BufferedIO: true to use a buffered output stream to the log file (improves
# performance when logging a lot of data but not so good if the system
# crashes or you want to watch the logs in real time) or false to write
# flush each message out to the log file.
#
# The default behavior of using non-buffered writes insures that a day's
# log file will not be written to after midnight. When buffering is enabled,
# a new message must be written to a log after midnight to force the previous
# day's log file to be flushed and closed.
#
#log4j.appender.T.BufferedIO=false
#
# BufferSize: sets the size of the buffer to use if BufferedIO is true.
# The default size is 8K.
#log4j.appender.T.BufferSize=8192
#
# Application logging options
#
#log4j.logger.org.apache=DEBUG
#log4j.logger.org.apache=INFO
#log4j.logger.org.apache.struts=DEBUG
#log4j.logger.org.apache.struts=INFO

没有评论: