Logging changes in ZEO break zeoup.py
Hi all, In Zope 2.7 I'm using zeoup.py to check on a ZEO server. This script can be run from anywhere as long as the PYTHONPATH is set correctly. For Zope 2.8.4, the ZEO logging has been switched to use the logging module. This leads to an error when running zeoup.py now: """ CRITICAL - zeoup status 1: No handlers could be found for logger "ZEO.zrpc.Connection(C)" ClientDisconnected """ Can anyone advise me how to make this work under Zope 2.8.4? jens
[Jens Vagelpohl]
In Zope 2.7 I'm using zeoup.py to check on a ZEO server. This script can be run from anywhere as long as the PYTHONPATH is set correctly.
For Zope 2.8.4, the ZEO logging has been switched to use the logging module. This leads to an error when running zeoup.py now:
""" CRITICAL - zeoup status 1: No handlers could be found for logger "ZEO.zrpc.Connection(C)" ClientDisconnected """
The logging module is just trying to drive you mad by saying "someone is _trying_ to log a CRITICAL problem, but I'm not going to show it to you". This is an "informative" msg, not an exception. It looks like you've got pieces of stdout and stderr scrambled together there, BTW.
Can anyone advise me how to make this work under Zope 2.8.4?
I expect zeoup.py needs to be changed. I did a similar thing for runzeo.py some time ago, and I bet the latter's setup_default_logging() method could be mostly reused. To get unstuck quickly, try adding just this: import logging logging.basicConfig() That always helps me in a pinch, but I never understood why (neither why logging insists that you call _something_ before it will stop annoying you, nor why the docs that seem to claim that logging will itself call basicConfig() (if you don't) appear to be telling fibs).
On 8 Dec 2005, at 22:57, Tim Peters wrote:
To get unstuck quickly, try adding just this:
import logging logging.basicConfig()
That always helps me in a pinch, but I never understood why (neither why logging insists that you call _something_ before it will stop annoying you, nor why the docs that seem to claim that logging will itself call basicConfig() (if you don't) appear to be telling fibs).
Thanks a lot Tim, I'll try that tomorrow! jens
On 8 Dec 2005, at 22:57, Tim Peters wrote:
Can anyone advise me how to make this work under Zope 2.8.4?
I expect zeoup.py needs to be changed. I did a similar thing for runzeo.py some time ago, and I bet the latter's setup_default_logging() method could be mostly reused.
Just checked in a suitable change which reuses most of that setup_default_logging method inside zeoup.py. I can feel Tim's pain now - this change went into three branches and the trunk... oh, and I hope I did correctly follow the slightly different change log conventions for NEWS.txt correctly. jens
participants (2)
-
Jens Vagelpohl -
Tim Peters