📄 log4j.properties
字号:
log4j.rootLogger=debug, stdout, R, MSGout
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.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=D\:\\print\\example.log
log4j.appender.R.MaxFileSize= 100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %d{yyyy-MM-dd HH\:mm\:ss,SSS} %c - %m%n
# log message
log4j.appender.MSGout=org.apache.log4j.RollingFileAppender
log4j.appender.MSGout.File=D\:\\print\\message.log
log4j.appender.MSGout.Threshold = WARN
log4j.appender.MSGout.MaxFileSize= 100KB
# Keep one backup file
log4j.appender.MSGout.MaxBackupIndex=1
log4j.appender.MSGout.layout=org.apache.log4j.PatternLayout
log4j.appender.MSGout.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss,SSS} - %m%n
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -