Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This XML file does not appear to have any style information associated with it. The document tree is shown below.
- <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
- <!-- == Log Appenders == -->
- <!-- Output the log message to system console.
- -->
- <appender name="StdErrAppender" class="org.apache.log4j.ConsoleAppender">
- <param name="Target" value="System.err"/>
- <!--
- other possible layout patterns
- the following appender creates a logfile in log4j XML format, suitable to viewing with
- XML log viewer such as Chainsaw (http://logging.apache.org/log4j/docs/chainsaw.html)
- <layout class="org.apache.log4j.xml.XMLLayout" />
- HTML table layout
- <layout class="org.apache.log4j.xml.HTMLLayout" />
- Time Thread Catagory layout
- <layout class="org.apache.log4j.TTCCLayout" />
- -->
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="[%t] | %-20.32c | %-5p | %d{ISO8601} | %m%n"/>
- </layout>
- </appender>
- <!--
- On application startup, a log file named "rollinglog.log" will be create if not exist.
- When the log file reach beyond 5KB, it will be renamed "rollinglog.log.1", when the log
- index reach "rollinglog.log.5", the next rename will be back to "rollinglog.log.1" and
- overite the old log.
- -->
- <appender name="RollLogAppender" class="org.apache.log4j.RollingFileAppender">
- <param name="file" value="./logs/rollinglog.txt"/>
- <param name="append" value="true"/>
- <param name="MaxFileSize" value="2MB"/>
- <param name="MaxBackupIndex" value="5"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="[%t] | %-20.32c | %-5p | %d{ISO8601} | %m%n"/>
- </layout>
- </appender>
- <!-- == Log filter setting == -->
- <!--
- Setup the root category, add the appenders and set the default level
- 5 level of logging, ALL < DEBUG < INFO < WARN < ERROR < FATAL
- The root level is set with INFO, which mean any message greater or same
- as INFO will be log down, in this case, DEBUG is not logged.
- To log all regardless of logging level, set <priority value="ALL">
- -->
- <root>
- <priority value="INFO"/>
- <appender-ref ref="StdErrAppender"/>
- <appender-ref ref="RollLogAppender"/>
- </root>
- <!--
- Example:
- Specify the target appender for SyManager
- Specify the level for SyManager
- -->
- <!--
- <category name="SyManager" >
- <priority value ="DEBUG" />
- <appender-ref ref="SyManagerAppender"/>
- </category>
- -->
- </log4j:configuration>
Add Comment
Please, Sign In to add comment