[Zope-dev] Logging changes in ZEO break zeoup.py

Tim Peters tim.peters at gmail.com
Thu Dec 8 17:57:49 EST 2005


[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).


More information about the Zope-Dev mailing list