Assuming you are using CAS 5.x the following should work. This is how I have
things set (relevant parts in bold). This is a portion of the log4j2.xml file
in /etc/cas/config
<Configuration monitorInterval="5" packages="org.apereo.cas.logging">
<Properties>
<!--
Default log directory is the current directory but that can be
overridden with -Dcas.log.dir=<logdir>
Or you can change this property to a new default
-->
<Property name="cas.log.dir" >/var/log/cas</Property>
<!-- To see more CAS specific logging, adjust this property to info or
debug or run server with -Dcas.log.level=debug -->
<Property name="cas.log.level" >warn</Property>
</Properties>
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="%d %p [%c] - <%m>%n"/>
</Console>
<RollingFile name="file" fileName="${sys:cas.log.dir}/cas.log"
append="true"
filePattern="${sys:cas.log.dir}/cas-%d{yyyy-MM-dd}.log">
<PatternLayout pattern="%d %p [%c] - <%m>%n"/>
<Policies>
<OnStartupTriggeringPolicy />
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
</Policies>
</RollingFile>
<RollingFile name="auditlogfile"
fileName="${sys:cas.log.dir}/cas_audit.log" append="true"
filePattern="${sys:cas.log.dir}/cas_audit-%d{yyyy-MM-dd}.log">
<PatternLayout pattern="%d %p [%c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy />
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
</Policies>
</RollingFile>
<RollingFile name="perfFileAppender"
fileName="${sys:cas.log.dir}/perfStats.log" append="true"
filePattern="${sys:cas.log.dir}/perfStats-%d{yyyy-MM-dd}.log">
<PatternLayout pattern="%m%n"/>
<Policies>
<OnStartupTriggeringPolicy />
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
</Policies>
</RollingFile>
Paul Chauvet, CISSP
Information Security Officer
State University of New York at New Paltz
845-257-3828
[email protected]<mailto:[email protected]>
[emlogo]
From: [email protected] <[email protected]> On Behalf Of Zach Tackett
Sent: Wednesday, November 14, 2018 9:19 AM
To: CAS Community <[email protected]>
Subject: [cas-user] How to change logging location
Currently, the cas, cas_audit, and perfStats logs are saving to the root cas
directory. Where can that be changed?
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected]<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/ab5f4e12-3f0f-49ba-a7ef-f20dc36811f5%40apereo.org<https://groups.google.com/a/apereo.org/d/msgid/cas-user/ab5f4e12-3f0f-49ba-a7ef-f20dc36811f5%40apereo.org?utm_medium=email&utm_source=footer>.
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/BL0PR20MB2209804A381D57439D97E0E8A7C30%40BL0PR20MB2209.namprd20.prod.outlook.com.