|
|
|
Log4j
|
Use of XMLLayout in Log4j
In the previous sections we have used PatternLayout and SimpleLayout, now we are going to describe you how to use XMLLayout class to produce logging output in the XML format.
View Rating |
|
|
Log4j
|
Layouts in Log4j
Users more often wish to customize their output according to their output format. Layout can be set by attaching it with the appender.
View Rating |
|
|
Log4j
|
Console Appender in Log4j
In this log4j console appender tutorial you will be introduced with ConsoleAppender which is used in Log4j for appending output on the console each and every time when any info(), debug(), error() method is invoked by the logger.
View Rating |
|
|
Log4j
|
log4j.xml Example
In earlier example you have seen that we can define properties of log4j logging file with the help of log4j.properties. Properties can also be defined within log4j.xml file. You have to add following contents to this XML file.
View Rating |
|
|