Commit 3e4d1ad6 authored by Misagh Moayyed's avatar Misagh Moayyed
Browse files

Merge pull request #11 from dbhankins/switch-to-log4j2

Switch CAS 4.1 overlay from log4j to log4j2.
parents c1c8176a d0587384
......@@ -177,9 +177,9 @@ tgc.signing.key=szxK-5_eJjs-aUj-64MpUZ-GPPzGLhYPLGl0wrYjYNVAGva2P0lLe6UGKGM7k8dW
# Log4j
# Default sourced from WEB-INF/spring-configuration/log4jConfiguration.xml:
#
# It is often time helpful to externalize log4j.xml to a system path to preserve settings between upgrades.
# e.g. log4j.config.location=/etc/cas/log4j.xml
log4j.config.location=file:///etc/cas/log4j.xml
# It is ofttimes helpful to externalize log4j2.xml to a system path to preserve settings between upgrades.
# e.g. log4j.config.location=file:///etc/cas/log4j2.xml
log4j.config.location=file:///etc/cas/log4j2.xml
#
log4j refresh interval in millis
log4j.refresh.interval=60000
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false" xmlns:log4j="http://jakarta.apache.org/log4j/">
<!--
This default ConsoleAppender is used to log all NON perf4j messages
to System.out
-->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %p [%c] - &lt;%m&gt;%n"/>
</layout>
</appender>
<appender name="cas" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="/var/log/cas/cas.log" />
<param name="MaxFileSize" value="512KB" />
<param name="MaxBackupIndex" value="3" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %p [%c] - %m%n"/>
</layout>
</appender>
<!--
WARNING: Setting the org.springframework logger to DEBUG displays debug information about
the request parameter values being bound to the command objects. This could expose your
password in the log file. If you are sharing your log files, it is recommend you selectively
apply DEBUG level logging on a an org.springframework.* package level (i.e. org.springframework.dao)
-->
<logger name="org.springframework">
<level value="WARN" />
</logger>
<logger name="org.springframework.webflow">
<level value="WARN" />
</logger>
<logger name="org.jasig" additivity="true">
<level value="DEBUG" />
<appender-ref ref="cas" />
</logger>
<logger name="net.unicon.cas" additivity="true">
<level value="DEBUG" />
<appender-ref ref="cas" />
</logger>
<logger name="org.jasig.inspektr.audit.support.Slf4jLoggingAuditTrailManager">
<level value="INFO" />
<appender-ref ref="cas" />
</logger>
<!--
WARNING: Setting the flow package to DEBUG will display
the parameters posted to the login servlet including
cleartext authentication credentials
-->
<logger name="org.jasig.cas.web.flow" additivity="true">
<level value="INFO" />
<appender-ref ref="cas" />
</logger>
<logger name="org.opensaml">
<level value="OFF" />
</logger>
<logger name="org.apache.xml">
<level value="OFF" />
</logger>
<!--
The root logger sends all log statements EXCEPT those sent to the perf4j
logger to System.out.
-->
<root>
<level value="DEBUG" />
<appender-ref ref="console" />
</root>
</log4j:configuration>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to Apereo under one or more contributor license
agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Apereo licenses this file to you under the Apache License,
Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a
copy of the License at the following location:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!-- Specify the refresh internal in seconds. -->
<Configuration monitorInterval="60">
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="%d %p [%c] - &lt;%m&gt;%n"/>
</Console>
<RollingFile name="file" fileName="cas.log" append="true"
filePattern="cas-%d{yyyy-MM-dd-HH}-%i.log">
<PatternLayout pattern="%d %p [%c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy />
<SizeBasedTriggeringPolicy size="10 MB"/>
<TimeBasedTriggeringPolicy />
</Policies>
</RollingFile>
<RollingFile name="perfFileAppender" fileName="perfStats.log" append="true"
filePattern="perfStats-%d{yyyy-MM-dd-HH}-%i.log">
<PatternLayout pattern="%m%n"/>
<Policies>
<OnStartupTriggeringPolicy />
<SizeBasedTriggeringPolicy size="10 MB"/>
<TimeBasedTriggeringPolicy />
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<Logger name="org.jasig" level="info" additivity="false">
<AppenderRef ref="console"/>
<AppenderRef ref="file"/>
</Logger>
<Logger name="org.springframework" level="warn" />
<Logger name="org.springframework.webflow" level="warn" />
<Logger name="org.springframework.web" level="warn" />
<Logger name="org.springframework.security" level="warn" />
<Logger name="perfStatsLogger" level="info" additivity="false">
<AppenderRef ref="perfFileAppender"/>
</Logger>
<Logger name="org.jasig.cas.web.flow" level="info" additivity="true">
<AppenderRef ref="file"/>
</Logger>
<Logger name="org.jasig.inspektr.audit.support.Slf4jLoggingAuditTrailManager" level="info">
<AppenderRef ref="file"/>
</Logger>
<Root level="error">
<AppenderRef ref="console"/>
</Root>
</Loggers>
</Configuration>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment