CSDN博客

Log4J学习笔记

发表于2004/9/28 13:41:00 835人阅读

分类：
笔记心得

Three Basic Concept:Category:you instantiate a category instance, you can call its various logging methods(such as debug, info, warn, error, fatal) to send your message to log.
Appender: Different destinations the message is appended. for example, file, console, jdbc, etc.
Layout: In which format you want your logging message will be appended. SimpleLayout, HTMLLayout, PatternLayout

A file named log4j.properties should be created and placed in same classpath with your application which invokes the log API.