log4j.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
  3. <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
  4. <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
  5. <param name="encoding" value="UTF-8" />
  6. <layout class="org.apache.log4j.PatternLayout">
  7. <param name="ConversionPattern"
  8. value="%p [%t] %c{1}.%M(%L) | %m%n"/>
  9. </layout>
  10. </appender>
  11. <appender name="myFile" class="org.apache.log4j.RollingFileAppender">
  12. <param name="File" value="/data/aviclog/superServiceConsole.log" /><!-- 设置日志输出文件名 -->
  13. <!-- 设置是否在重新启动服务时,在原有日志的基础添加新日志 -->
  14. <param name="Append" value="true" />
  15. <param name="MaxBackupIndex" value="10" />
  16. <layout class="org.apache.log4j.PatternLayout">
  17. <param name="ConversionPattern" value="%p (%c:%L)- %m%n" />
  18. </layout>
  19. </appender>
  20. <appender name="activexAppender" class="org.apache.log4j.DailyRollingFileAppender">
  21. <param name="File" value="/data/aviclog/superServiceActive.log" />
  22. <param name="DatePattern" value="'.'yyyy-MM-dd'.log'" />
  23. <layout class="org.apache.log4j.PatternLayout">
  24. <param name="ConversionPattern"
  25. value="[%d{MMdd HH:mm:ss SSS\} %-5p] [%t] %c{3\} - %m%n" />
  26. </layout>
  27. </appender>
  28. <logger name="net.sf.ehcache">
  29. <level value="ERROR"/>
  30. </logger>
  31. <!-- Suppress success logging from InteractiveAuthenticationSuccessEvent -->
  32. <logger name="org.springframework.security">
  33. <level value="ERROR"/>
  34. </logger>
  35. <logger name="org.apache">
  36. <level value="WARN"/>
  37. </logger>
  38. <logger name="org.apache.velocity">
  39. <level value="FATAL"/>
  40. </logger>
  41. <!-- Suppress invalid warning messages from JSF -->
  42. <logger name="org.apache.myfaces">
  43. <level value="ERROR"/>
  44. </logger>
  45. <!-- Suppress warnings from Struts -->
  46. <logger name="org.apache.struts2.util.TextProviderHelper">
  47. <level value="ERROR"/>
  48. </logger>
  49. <logger name="com.opensymphony.xwork2.util.OgnlUtil">
  50. <level value="ERROR"/>
  51. </logger>
  52. <logger name="com.opensymphony.xwork2.ognl.OgnlValueStack">
  53. <level value="ERROR"/>
  54. </logger>
  55. <logger name="org.dbunit">
  56. <level value="WARN"/>
  57. </logger>
  58. <logger name="org.hibernate">
  59. <level value="WARN"/>
  60. </logger>
  61. <logger name="org.hibernate.SQL">
  62. <level value="INFO"/>
  63. </logger>
  64. <logger name="org.springframework">
  65. <level value="WARN"/>
  66. </logger>
  67. <logger name="com.palmnest">
  68. <level value="DEBUG"/>
  69. </logger>
  70. <logger name="com.palmnest.tool">
  71. <level value="INFO"/>
  72. </logger>
  73. <root>
  74. <level value="DEBUG"/>
  75. <appender-ref ref="CONSOLE"/>
  76. </root>
  77. <!-- 根logger的设置-->
  78. <root>
  79. <priority value ="error"/>
  80. <appender-ref ref="myFile"/>
  81. <appender-ref ref="activexAppender"/>
  82. </root>
  83. </log4j:configuration>