[ZODB-Dev] help with logging

Tim Peters tim at zope.com
Sun Mar 13 20:54:13 EST 2005


[John Belmonte]
> With 3.3.1a1, I have the following in my ZEO config file:
>
> <eventlog>
>      <logfile>
>          path $base_dir/logs/zeo.log
>      </logfile>
> </eventlog>
>
> Some messages end up in this file, while others are suppressed with a
> message to stderr, such as "No handlers could be found for logger
> zeo.cache".  I understand that I can call logging.basicConfig() to set a
> default handler, but where does this call need to be placed to cover
> whatever is logging to zeo.cache?

I don't understand how logging works.  I'll try to make some time to look at
this tomorrow, perhaps with Fred's help.

ZEO/cache.py gets a logger object like so:

    logger = logging.getLogger("zeo.cache")

Offhand, that looks the same to me as what all other code does, so I don't
have a guess for why zeo.cache messages aren't getting logged.

Hmm.  By eyeball, the others use "ZEO." (all uppercase) at the start of the
string passed to getLogger.  Maybe that's it?  But I don't see anything in
runzeo.py's logging setup that could possibly key off that.



More information about the ZODB-Dev mailing list