log4j.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. Licensed to Jasig under one or more contributor license
  4. agreements. See the NOTICE file distributed with this work
  5. for additional information regarding copyright ownership.
  6. Jasig licenses this file to you under the Apache License,
  7. Version 2.0 (the "License"); you may not use this file
  8. except in compliance with the License. You may obtain a
  9. copy of the License at the following location:
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing,
  12. software distributed under the License is distributed on an
  13. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. KIND, either express or implied. See the License for the
  15. specific language governing permissions and limitations
  16. under the License.
  17. -->
  18. <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
  19. <log4j:configuration debug="false" xmlns:log4j="http://jakarta.apache.org/log4j/">
  20. <!--
  21. This default ConsoleAppender is used to log all NON perf4j messages
  22. to System.out
  23. -->
  24. <appender name="console" class="org.apache.log4j.ConsoleAppender">
  25. <layout class="org.apache.log4j.PatternLayout">
  26. <param name="ConversionPattern" value="%d %p [%c] - &lt;%m&gt;%n"/>
  27. </layout>
  28. </appender>
  29. <appender name="cas" class="org.apache.log4j.RollingFileAppender">
  30. <param name="File" value="cas.log" />
  31. <param name="MaxFileSize" value="512KB" />
  32. <param name="MaxBackupIndex" value="3" />
  33. <layout class="org.apache.log4j.PatternLayout">
  34. <param name="ConversionPattern" value="%d %p [%c] - %m%n"/>
  35. </layout>
  36. </appender>
  37. <!-- Perf4J appenders -->
  38. <!--
  39. This AsyncCoalescingStatisticsAppender groups StopWatch log messages
  40. into GroupedTimingStatistics messages which it sends on the
  41. file appender defined below
  42. -->
  43. <appender name="CoalescingStatistics" class="org.perf4j.log4j.AsyncCoalescingStatisticsAppender">
  44. <param name="TimeSlice" value="60000"/>
  45. <appender-ref ref="fileAppender"/>
  46. <appender-ref ref="graphExecutionTimes"/>
  47. <appender-ref ref="graphExecutionTPS"/>
  48. </appender>
  49. <!-- This file appender is used to output aggregated performance statistics -->
  50. <appender name="fileAppender" class="org.apache.log4j.FileAppender">
  51. <param name="File" value="perfStats.log"/>
  52. <layout class="org.apache.log4j.PatternLayout">
  53. <param name="ConversionPattern" value="%m%n"/>
  54. </layout>
  55. </appender>
  56. <appender name="graphExecutionTimes" class="org.perf4j.log4j.GraphingStatisticsAppender">
  57. <!-- Possible GraphTypes are Mean, Min, Max, StdDev, Count and TPS -->
  58. <param name="GraphType" value="Mean"/>
  59. <!-- The tags of the timed execution blocks to graph are specified here -->
  60. <param name="TagNamesToGraph" value="DESTROY_TICKET_GRANTING_TICKET,GRANT_SERVICE_TICKET,GRANT_PROXY_GRANTING_TICKET,VALIDATE_SERVICE_TICKET,CREATE_TICKET_GRANTING_TICKET,AUTHENTICATE" />
  61. </appender>
  62. <appender name="graphExecutionTPS" class="org.perf4j.log4j.GraphingStatisticsAppender">
  63. <param name="GraphType" value="TPS" />
  64. <param name="TagNamesToGraph" value="DESTROY_TICKET_GRANTING_TICKET,GRANT_SERVICE_TICKET,GRANT_PROXY_GRANTING_TICKET,VALIDATE_SERVICE_TICKET,CREATE_TICKET_GRANTING_TICKET,AUTHENTICATE" />
  65. </appender>
  66. <!-- Loggers -->
  67. <!--
  68. The Perf4J logger. Note that org.perf4j.TimingLogger is the value of the
  69. org.perf4j.StopWatch.DEFAULT_LOGGER_NAME constant. Also, note that
  70. additivity is set to false, which is usually what is desired - this means
  71. that timing statements will only be sent to this logger and NOT to
  72. upstream loggers.
  73. -->
  74. <logger name="org.perf4j.TimingLogger" additivity="false">
  75. <level value="INFO" />
  76. <appender-ref ref="CoalescingStatistics" />
  77. </logger>
  78. <!--
  79. WARNING: Setting the org.springframework logger to DEBUG displays debug information about
  80. the request parameter values being bound to the command objects. This could expose your
  81. password in the log file. If you are sharing your log files, it is recommend you selectively
  82. apply DEBUG level logging on a an org.springframework.* package level (i.e. org.springframework.dao)
  83. -->
  84. <logger name="org.springframework">
  85. <level value="WARN" />
  86. </logger>
  87. <logger name="org.springframework.webflow">
  88. <level value="WARN" />
  89. </logger>
  90. <logger name="org.jasig" additivity="true">
  91. <level value="INFO" />
  92. <appender-ref ref="cas" />
  93. </logger>
  94. <logger name="com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager">
  95. <level value="INFO" />
  96. <appender-ref ref="cas" />
  97. </logger>
  98. <!--
  99. WARNING: Setting the flow package to DEBUG will display
  100. the parameters posted to the login servlet including
  101. cleartext authentication credentials
  102. -->
  103. <logger name="org.jasig.cas.web.flow" additivity="true">
  104. <level value="INFO" />
  105. <appender-ref ref="cas" />
  106. </logger>
  107. <logger name="com.jsjty.zygl" additivity="false">
  108. <level value="DEBUG" />
  109. <appender-ref ref="fileAppender" />
  110. </logger>
  111. <!--
  112. The root logger sends all log statements EXCEPT those sent to the perf4j
  113. logger to System.out.
  114. -->
  115. <root>
  116. <level value="ERROR" />
  117. <appender-ref ref="console" />
  118. </root>
  119. </log4j:configuration>