Guest User

Untitled

a guest
May 13th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. This XML file does not appear to have any style information associated with it. The document tree is shown below.
  2. <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
  3. <!-- == Log Appenders == -->
  4. <!-- Output the log message to system console.
  5. -->
  6. <appender name="StdErrAppender" class="org.apache.log4j.ConsoleAppender">
  7. <param name="Target" value="System.err"/>
  8. <!--
  9. other possible layout patterns
  10.  
  11. the following appender creates a logfile in log4j XML format, suitable to viewing with
  12. XML log viewer such as Chainsaw (http://logging.apache.org/log4j/docs/chainsaw.html)
  13. <layout class="org.apache.log4j.xml.XMLLayout" />
  14.  
  15. HTML table layout
  16. <layout class="org.apache.log4j.xml.HTMLLayout" />
  17.  
  18. Time Thread Catagory layout
  19. <layout class="org.apache.log4j.TTCCLayout" />
  20.  
  21. -->
  22. <layout class="org.apache.log4j.PatternLayout">
  23. <param name="ConversionPattern" value="[%t] | %-20.32c | %-5p | %d{ISO8601} | %m%n"/>
  24. </layout>
  25. </appender>
  26. <!--
  27. On application startup, a log file named "rollinglog.log" will be create if not exist.
  28. When the log file reach beyond 5KB, it will be renamed "rollinglog.log.1", when the log
  29. index reach "rollinglog.log.5", the next rename will be back to "rollinglog.log.1" and
  30. overite the old log.
  31.  
  32. -->
  33. <appender name="RollLogAppender" class="org.apache.log4j.RollingFileAppender">
  34. <param name="file" value="./logs/rollinglog.txt"/>
  35. <param name="append" value="true"/>
  36. <param name="MaxFileSize" value="2MB"/>
  37. <param name="MaxBackupIndex" value="5"/>
  38. <layout class="org.apache.log4j.PatternLayout">
  39. <param name="ConversionPattern" value="[%t] | %-20.32c | %-5p | %d{ISO8601} | %m%n"/>
  40. </layout>
  41. </appender>
  42. <!-- == Log filter setting == -->
  43. <!--
  44. Setup the root category, add the appenders and set the default level
  45. 5 level of logging, ALL < DEBUG < INFO < WARN < ERROR < FATAL
  46. The root level is set with INFO, which mean any message greater or same
  47. as INFO will be log down, in this case, DEBUG is not logged.
  48. To log all regardless of logging level, set <priority value="ALL">
  49.  
  50. -->
  51. <root>
  52. <priority value="INFO"/>
  53. <appender-ref ref="StdErrAppender"/>
  54. <appender-ref ref="RollLogAppender"/>
  55. </root>
  56. <!--
  57. Example:
  58. Specify the target appender for SyManager
  59. Specify the level for SyManager
  60.  
  61. -->
  62. <!--
  63.  
  64. <category name="SyManager" >
  65. <priority value ="DEBUG" />
  66.  
  67. <appender-ref ref="SyManagerAppender"/>
  68. </category>
  69.  
  70. -->
  71. </log4j:configuration>
Add Comment
Please, Sign In to add comment