log4j.properties is configured as follows
-sharp Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=DEBUG, A1
-sharp A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
-sharp A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%r %d{yyyy-MM-dd HH\:mm\:ss} %c %p -%m%n
two questions
- Why is there an extra number in front of it? Sometimes it"s 1, sometimes it"s 2?
- Why is the log printed twice?