log4j.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. <layout class="org.apache.log4j.PatternLayout">
  6. <param name="ConversionPattern"
  7. value="%p - %c.%M(%L) | %m%n"/>
  8. </layout>
  9. </appender>
  10. <appender name="DailyFile" class="org.apache.log4j.DailyRollingFileAppender">
  11. <param name="File" value="${catalina.base}/logs/nwyj.log"/>
  12. <param name="Append" value="true"/>
  13. <layout class="org.apache.log4j.PatternLayout">
  14. <param name="ConversionPattern" value="%d [%t] %p - %c.%M(%L) | %m%n"/>
  15. </layout>
  16. </appender>
  17. <!-- <appender name="MongoDB" class="com.sinosoft.lz.common.log4j.TestAppender">
  18. <param name="host" value="localhost"/>
  19. <param name="port" value="27017"/>
  20. <param name="database" value="gzfwDB"/>
  21. <param name="collection" value="gzfwLog"/>
  22. <param name="collectionPattern" value="%X{version}"/>
  23. <param name="warnOrHigherWriteConcern" value="FSYNC_SAFE"/>
  24. <layout class="org.apache.log4j.PatternLayout">
  25. </layout>
  26. </appender> -->
  27. <logger name="org.apache">
  28. <level value="info"/>
  29. </logger>
  30. <logger name="org.hibernate">
  31. <level value="info"/>
  32. </logger>
  33. <logger name="org.hibernate.SQL">
  34. <level value="info"/>
  35. </logger>
  36. <logger name="org.springframework">
  37. <level value="info"/>
  38. </logger>
  39. <logger name="org.springframework.aop.framework.Cglib2AopProxy">
  40. <level value="info"/>
  41. </logger>
  42. <logger name="com.sysmodel">
  43. <level value="info"/>
  44. </logger>
  45. <logger name="com.aweb">
  46. <level value="info"/>
  47. </logger>
  48. <logger name="com.nxt.robber">
  49. <level value="info"/>
  50. </logger>
  51. <logger name="com.mchange">
  52. <level value="info"/>
  53. </logger>
  54. <root>
  55. <level value="info"/>
  56. <appender-ref ref="DailyFile"/>
  57. <appender-ref ref="CONSOLE"/>
  58. <!-- <appender-ref ref="MongoDB"/> -->
  59. </root>
  60. </log4j:configuration>