Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
File appender log4j.properties
log4j.rootCategory=INFO, file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=/log/my-webapp.log
log4j.appender.file.MaxFileSize=5MB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d %p [%c] - %m %n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment