Log4J configuration file
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=DEBUG, A1
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c - %m%n
Program
|
Java2html |
Output:
0 [main] DEBUG LoggerTest - Entering main453 [main] DEBUG LoggerTest - Exiting main
Discuss this post in the learning forum.
Note: This text was originally posted on my earlier blog at http://www.adaptivelearningonline.net
Commercial Links
- Buy programming books from our Amazon.com powered storefront.
- Earn as you browse. Sign up for Algoco.
Comments