In tomcat/logs
directory we have different set of files which are normally rotated everyday. Is there any procedure to override rotating mechanism for catalina.out
, localhost_access_log
, manager.${DATE}.log
, host-manager.${DATE}.log
I don't want to rely on logrotate utility as there is a chance of losing data in log files.
After reading couple of articles there is one way to create a new file by adding some configurational changes in tomcat/conf/server.xml
file
<Valve
className="org.apache.catalina.valves.AccessLogValve"
directory="logs"
prefix="catalina."
suffix=".out"
pattern='%a %A %b %B %h %l %m %p %q %u %t "%r" %s %U %D %S'
resolveHosts="false"
rotatable="true"/>
this piece of configuration does not fulfill my requirement. tomcat/conf/log4.properties
changes do not work for me.
your support is highly appreciated. Thanks.