On 03.12.2012 12:09, Konstantin Kolinko wrote:
> 2012/11/29  <rj...@apache.org>:
>> Author: rjung
>> Date: Thu Nov 29 08:33:47 2012
>> New Revision: 1415081
>>
>> URL: http://svn.apache.org/viewvc?rev=1415081&view=rev
>> Log:
>> Add new ALV attribute "renameOnRotate" (Default:false).
>>
>> If set to "true", the "fileDateFormat" will not be part
>> of the current log file. Only at the time of log rotation
>> the file is renamed to the final name including the
>> "fileDateFormat".
>>
>> This mimics the behavior e.g. of Log4J and similar frameworks,
>> where the active file does not have the timestamp in the file
>> name.
>>
>> Pro: current file has stable name, all files with
>>      timestamp in name are old.
>> Con: Slightly more complex impl.
>>
>> Backport of r1414889 from trunk.
>>
>> Modified:
>>     tomcat/tc7.0.x/trunk/   (props changed)
>>     tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
>>     
>> tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties
>>     
>> tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml
>>     tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>>     tomcat/tc7.0.x/trunk/webapps/docs/config/valve.xml
>>
> 
> Interesting.
> Several notes. Just informational.
> a) It should be easy to extend this to skip rotation if file.length() is 0.

Not so sure about that one. An empty rotated file shows there was
nothing written. Skipping rotation might lead to the question, whether
rotation is broken (or the server was down during the change of date).

So I'd prefer keeping the rotation since it isn't so expensive and
doesn't happen to early.

But maybe I misunderstood you.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to