Hi, I try to make a log rotation on Zope-2.6.1 on Solaris. I just do : mv Z2.log Z2.log.0 kill -USR2 `cat Z2.pid` My Zope events log say that log file have been reopened, but in fact Z2.log is not created and log goes on in Z2.log.0 The same thing works correctly with Zope-2.6.1 on Linux... Any idea ?? I wouldn't like to have to restart Zope and flush all my caches to make this rotation... Thanks, Thierry -- Linux every day, keeps Dr Watson away... http://gpc.sourceforge.net -- http://www.ulthar.net
Hi Thierry, I'm saddened to report that this code was probably never tested on Solaris. Do you think you might be able to file an issue in the collector about it? On Mon, 2003-05-05 at 09:39, Thierry FLORAC wrote:
Hi,
I try to make a log rotation on Zope-2.6.1 on Solaris. I just do :
mv Z2.log Z2.log.0 kill -USR2 `cat Z2.pid`
My Zope events log say that log file have been reopened, but in fact Z2.log is not created and log goes on in Z2.log.0 The same thing works correctly with Zope-2.6.1 on Linux...
Any idea ?? I wouldn't like to have to restart Zope and flush all my caches to make this rotation... Thanks,
Thierry
-- Linux every day, keeps Dr Watson away... http://gpc.sourceforge.net -- http://www.ulthar.net
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
In February, I reported the same problem on FreeBSD, but received no response when I asked if anyone else had the same problem. A bit more information. This is particular to the access log (Z2.log). When z2.py starts the access log, it successfully saves the file_logger instance to sys.__lg: lg = logger.file_logger(LOG_PATH) zLOG.LOG('z2', zLOG.BLATHER, 'Using access log file %s' % LOG_PATH) sys.__lg = lg However, when Signals.py handles SIGUSR2 and tries to recover the file_logger instance with "getattr(sys, '__lg', None)" it can't find it and silently fails. Note that using SIGHUP works. All this is happening on Zope 2.6.1, FreeBSD 4.5, Python 2.1.3.
/var/db/zope261/var #mv Z2.log Z2.log.rotate /var/db/zope261/var #touch Z2.log; chmod 664 Z2.log /var/db/zope261/var #kill -USR2 `cat Z2.pid` /var/db/zope261/var #tail event.log ------ 2003-02-24T08:47:20 INFO(0) Z2 Caught signal SIGUSR2 ------ 2003-02-24T08:47:20 INFO(0) Z2 Reopening log files ------ 2003-02-24T08:47:20 INFO(0) Z2 Log files reopened successfully
[Zope activity] /var/db/zope261/var #ls -l Z2.log -rw-rw-r-- 1 zope 0 Feb 24 08:46 Z2.log [note: old log file is still being updated.]
[now try SIGHUP, which works] /var/db/zope261/var #kill -HUP `cat *.pid` [Zope activity] /var/db/zope261/var #ls -l Z2.log -rw-rw-r-- 1 zope 1545 Feb 24 08:48 Z2.log
Thierry FLORAC wrote:
Hi,
I try to make a log rotation on Zope-2.6.1 on Solaris. I just do :
mv Z2.log Z2.log.0 kill -USR2 `cat Z2.pid`
My Zope events log say that log file have been reopened, but in fact Z2.log is not created and log goes on in Z2.log.0 The same thing works correctly with Zope-2.6.1 on Linux...
Any idea ?? I wouldn't like to have to restart Zope and flush all my caches to make this rotation... Thanks,
Thierry
-- ______________________________________________________ Steve McMahon Reid-McMahon, LLC steve@reidmcmahon.com steve@dcn.org
Hi, On Monday 05 May 2003 17:22, Steve McMahon wrote:
In February, I reported the same problem on FreeBSD, but received no response when I asked if anyone else had the same problem.
A bit more information. This is particular to the access log (Z2.log).
No, I think it's the same problem for the events log...
Note that using SIGHUP works. All this is happening on Zope 2.6.1, FreeBSD 4.5, Python 2.1.3.
Yes, but what I'd like to do is to make my logs rotation without restarting Zope and flushing my caches... :-((( Thierry
Thierry FLORAC wrote:
Hi,
I try to make a log rotation on Zope-2.6.1 on Solaris. I just do :
mv Z2.log Z2.log.0 kill -USR2 `cat Z2.pid`
My Zope events log say that log file have been reopened, but in fact Z2.log is not created and log goes on in Z2.log.0 The same thing works correctly with Zope-2.6.1 on Linux...
Any idea ?? I wouldn't like to have to restart Zope and flush all my caches to make this rotation... Thanks,
Thierry
-- Linux every day, keeps Dr Watson away... http://gpc.sourceforge.net -- http://www.ulthar.net
participants (3)
-
Chris McDonough -
Steve McMahon -
Thierry FLORAC