The AccessLog Valves might be nice to simplify so a "Logging" element is a nested inside of the Valve declaration. This way the access log valve can just do 3 things:
- determine if it should log (conditional logging)
- format a string to be logged
- Pass it along to a "logging" element which can then store the log entry somewhere



This way the Accesslog valve code with respect to File rotation, handling, ... can be greatly simplified.


for example: (some names are wrong but just an example)
<Valve className="org.apache.catalina.valves.AccessLogValve"
       pattern="common" resolveHosts="false">
   <Logger className="org.apache.catalina.logger.SimpleLogger"
           directory="logs"  prefix="localhost_access_log." suffix=".txt" />
</Valve>
<Valve className="org.apache.catalina.valves.AccessLogValve"
       pattern="common" resolveHosts="false">
   <Logger className="org.apache.catalina.logger.PipedLogger"
           exec="logrotate.pl" />
</Valve>
<Valve className="org.apache.catalina.valves.AccessLogValve"
       pattern="common" resolveHosts="false">
   <Logger className="org.apache.catalina.logger.FileDateFormatLogger"
           directory="logs"   dateStamp="mm-DD-yyyy"
           prefix="localhost_access_log." suffix=".txt" />
</Valve>

-Tim



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to