Brad Lucas

A blog mostly about programming
July 8, 2008

Simple Log4j Properties File

log4j.debug=true

# Set root logger to DEBUG and add an appender called A1.
log4j.rootLogger=DEBUG, A1

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender

# A1 uses PatternLayout
log4.appender.A1.layout-org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Tags: java