Mantis - Resin
Viewing Issue Advanced Details
438 minor always 10-31-05 00:00 01-16-06 11:29
ferg  
ferg  
urgent  
closed 3.0.14  
3.0.14 fixed  
none    
none 3.0.18  
0000438: log rollover and gzip
RSN-487
(rep by Nathan Bardsley)


In resin.conf I configure the stdout logs like this:

      <access-log path="logs/access.log"
            format='%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"'
            rollover-period="1D" rollover-size="-1"
            archive-format="_resin_sw5_access_%Y-%m-%d.log.gz"/>
        <stdout-log path="log/stdout.log" timestamp="[%H:%M:%S.%s] " rollover-period="1D"
            rollover-size="-1" archive-format="_resin_sw5_stdout_%Y-%m-%d.log.gz"/>
        <stderr-log path="log/stderr.log" timestamp="[%H:%M:%S.%s] " rollover-period="1D"
            rollover-size="-1" archive-format="_resin_sw5_stderr_%Y-%m-%d.log.gz"/>


I end up with logs like this:

_resin_sw5_access_2005-10-27.log.gz
_resin_sw5_access_2005-10-28.log.gz
_resin_sw5_stderr_2005-10-27.log.gz
_resin_sw5_stderr_2005-10-28.log.gz
_resin_sw5_stdout_2005-10-27.log.gz
_resin_sw5_stdout_2005-10-27.log.gz.16
_resin_sw5_stdout_2005-10-27.log.gz.17
_resin_sw5_stdout_2005-10-27.log.gz.19
_resin_sw5_stdout_2005-10-27.log.gz.20
_resin_sw5_stdout_2005-10-27.log.gz.21
_resin_sw5_stdout_2005-10-27.log.gz.23
_resin_sw5_stdout_2005-10-28.log.gz
_resin_sw5_stdout_2005-10-28.log.gz.03
_resin_sw5_stdout_2005-10-28.log.gz.05
_resin_sw5_stdout_2005-10-28.log.gz.06
_resin_sw5_stdout_2005-10-28.log.gz.08
_resin_sw5_stdout_2005-10-28.log.gz.09
_resin_sw5_stdout_2005-10-28.log.gz.12
_resin_sw5_stdout_2005-10-28.log.gz.14
_resin_sw5_stdout_2005-10-28.log.gz.16
_resin_sw5_stdout_2005-10-28.log.gz.18
_resin_sw5_stdout_2005-10-28.log.gz.20
_resin_sw5_stdout_2005-10-28.log.gz.21
_resin_sw5_stdout_2005-10-28.log.gz.23

The files that end in digits (which seem to correspond to hour) are not encrypted.

How can I get log rotation that works for stdout the same way that it workfs for stderr and access?


Notes
(0000472)
user446   
10-31-05 00:00   
Most of these files are empty, so it's not a problem of an excessive number of log entries.

Possible enhancement? Some extra capabilities for handling 0 byte files at rotation time in different ways. Maybe not gzipping them (thus saving the 30 bytes for an empty .gzip file) or deleteing the file completely.
(0000711)
ferg   
01-16-06 11:29   
php/021u