log4j.properties
来自「《基于Eclipse的开源框架技术与实战》[第5章]随书源码」· PROPERTIES 代码 · 共 29 行
PROPERTIES
29 行
# A sample log4j configuration file
# Create two appenders, one called stdout and the other called rolling
log4j.rootLogger=DEBUG, rolling
# Configure the stdout appender to go to the Console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
# Configure the stdout appender to use the PatternLayout
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
# Configure the rolling appender to be a RollingFileAppender
log4j.appender.rolling=org.apache.log4j.RollingFileAppender
# Configure the name of the logout for the rolling appender
log4j.appender.rolling.File=output.log
# Set up the maximum size of the rolling log files
log4j.appender.rolling.MaxFileSize=100KB
# Keep one backup file of the rolling appender
log4j.appender.rolling.MaxBackupIndex=1
# Configure the Layout pattern and conversion pattern for the rolling appender
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%d{ABSOLUTE} - %p %c - %m%n
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?