Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Log4j 1.x basic log4j.properties
log4j.rootLogger=DEBUG, console
#console appender
log4j.appender.console=org.apache.log4j.ConsoleAppender
#define patternlayour for console appender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
@kevinhooke
Copy link
Author

kevinhooke commented Apr 14, 2015

  • remove [%t] if including the thread name is too verbose
  • add log4j.logger.package.name=level to control specific logger levels

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment