Hello,
Tomcat server version: 9.0.98.
server.xml configuration for AccessLogValve:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".log" maxDays="7" pattern="%h
%{X-Forwarded-For}i %t %I "%m %U" %{local}p %s %b %D"
resolveHosts="false" />
Everything works fine. Now, I have a requirement to archive these log files
similar to log4j <RollingFile> (pattern is already taken care of in the valve)
with <Policies> (archive when the file size reaches certain size) and
<DefaultRolloverStrategy> (cleanup archived files).
Is there a way to archive these logs via the configuration in the valve? If
not, what the best way to go about it: a custom class that implements ValveBase
or extends AccessLogValve or do something else entirely?
Thanks and regards,
-----------------------------------------------------
Quoc