BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sajid01
Meteorite | Level 14

Hello
I want to modify the log4j.xml so that a new catalina.out is generated at 12.00 AM .
My existing log4j.xml has the following
<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${catalina.base}/logs/catalina.out"/>
<param name="Append" value="true"/>
<param name="immediateFlush" value="true"/>
After the above lines I want to add the following
<rollingPolicy class="TimeBasedRollingPolicy">
<param name="FileNamePattern" value="${catalina.base}/logs/catalina_%d.out"/>
</rollingPolicy>
(https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=logug&docsetTarget=p1agg6...)
I am not sure if the value of FileNamePattern parameter is correct.
Can anybody advise?

 

1 ACCEPTED SOLUTION

Accepted Solutions
gwootton
SAS Super FREQ
The catalina.out file is the console output for the Tomcat server. This is typically not created by a log4j configuration, though it's ConsoleAppender writes to stdout, which is captured to catalina.out.

You could use the Linux built-in log rotation facility to do this rather than trying to modify the configuration of tomcat.

https://linux.die.net/man/8/logrotate
--
Greg Wootton | Principal Systems Technical Support Engineer

View solution in original post

2 REPLIES 2
gwootton
SAS Super FREQ
The catalina.out file is the console output for the Tomcat server. This is typically not created by a log4j configuration, though it's ConsoleAppender writes to stdout, which is captured to catalina.out.

You could use the Linux built-in log rotation facility to do this rather than trying to modify the configuration of tomcat.

https://linux.die.net/man/8/logrotate
--
Greg Wootton | Principal Systems Technical Support Engineer
Sajid01
Meteorite | Level 14

Thanks once again.
I have implemented the logrotate on this file with weekly rotation. It works

 

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 4112 views
  • 1 like
  • 2 in conversation