[Zope] Z2.log grows and Gzip question

Dieter Maurer dieter@handshake.de
Mon, 7 Jul 2003 19:48:58 +0200


Paolo Dina wrote at 2003-7-7 09:37 +0200:
 > 1) my Z2.log is growing continuously, and that would not be strictly a 
 > problem; but now it's 1.3Gb.. and i can expect him to grow more and 
 > more... My ambition is not to full entire disk space for the logs, but 
 > as i know, i can't avoid to keep them!
 > The content of Z2.log is plain text, and i can suppose that using some 
 > sort of compression method probably might lead to an high rate 
 > compression of Z2.log. It would be great if Medusa could handle 
 > compressed Z2.log.

When you sent a Zope process a "SIGUSR2" signal, it closes and
reopens all its log files.

You can use this for log rotation. E.g.

    mv Z2.log Z2.log.save
    kill -SIGUSR2 $(cat var/Z2.pid) # this will close the old log file and open a new one

Now, you can compress "Z2.log.save" (or delete it).



Dieter