log4j.properties

来自「利用JAVA调用wps的API实现在线打印功能」· PROPERTIES 代码 · 共 29 行

PROPERTIES
29
字号
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 + =
减小字号Ctrl + -
显示快捷键?