Differences
This shows you the differences between two versions of the page.
|
log4jconfiguration [2011/06/30 13:54] predrag.radenkovic [log4j Configuration] |
log4jconfiguration [2011/06/30 14:03] (current) predrag.radenkovic [Complete log4j.xml Example] |
||
|---|---|---|---|
| Line 24: | Line 24: | ||
| <file xml> | <file xml> | ||
| <param name="file" value="/home/user/soloist/repository/out.log"></param> | <param name="file" value="/home/user/soloist/repository/out.log"></param> | ||
| + | </file> | ||
| + | |||
| + | ===== Complete log4j.xml Example ===== | ||
| + | Below is the complete log4j.xml from the Empty Project. | ||
| + | |||
| + | <file xml log4j.xml> | ||
| + | <?xml version="1.0" encoding="UTF-8" ?> | ||
| + | <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | ||
| + | |||
| + | <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> | ||
| + | <appender name="console" class="org.apache.log4j.ConsoleAppender"> | ||
| + | <param name="Target" value="System.out" /> | ||
| + | <layout class="org.apache.log4j.PatternLayout"> | ||
| + | <param name="ConversionPattern" value="%-5p %d{ABSOLUTE} - %m%n" /> | ||
| + | </layout> | ||
| + | </appender> | ||
| + | |||
| + | <appender name="file" class="org.apache.log4j.DailyRollingFileAppender"> | ||
| + | <param name="file" value="d:/temp/repository/out.log"></param> | ||
| + | <layout class="org.apache.log4j.PatternLayout"> | ||
| + | <param name="ConversionPattern" value="%-5p %d{ABSOLUTE} - %m%n"></param> | ||
| + | </layout> | ||
| + | </appender> | ||
| + | |||
| + | <logger name="rs.sol.soloist"> | ||
| + | <level value="info" /> | ||
| + | </logger> | ||
| + | |||
| + | <root> | ||
| + | <priority value="info" /> | ||
| + | <appender-ref ref="file" /> | ||
| + | <appender-ref ref="console" /> | ||
| + | </root> | ||
| + | </log4j:configuration> | ||
| </file> | </file> | ||