[ZODB-Dev] errors logged at info in ZEO's connection

Jim Fulton jim at zope.com
Fri Nov 20 15:32:50 EST 2009


On Fri, Nov 20, 2009 at 3:15 PM, Chris Withers <chris at simplistix.co.uk> wrote:
> Hi All (although I guess predominantly Jim),
>
> ZEO/zprc/connection.py contains this rather odd piece of code:
>
>             raise
>         except Exception, msg:
>             if not isinstance(msg, self.unlogged_exception_types):
>                 self.log("%s() raised exception: %s" % (name, msg),
>                          logging.INFO, exc_info=True)
>
> Any objections to me changing this on the 3.9 branch and trunk to:
>
>             raise
>         except Exception, msg:
>             if not isinstance(msg, self.unlogged_exception_types):
>                 self.logger.exception(
>                     "%s() raised exception: %s" % (name, msg),
>                     )
>
> ...and making sure there's a test of some sort that demonstrates this?

Yes, I object on 2 levels.

First, as I said earlier, all check ins must go into branches for my
review and merge. The branch should be from the 3.9 branch.

Second, the change should simply change the level passed to self.log.
The log method adds a log label that can be very useful.

> It seems a bit bizarre that exceptions are logged at INFO rather than
> ERROR...

Agreed.  A simple fix and test on a branch would be appreciated.

Jim

-- 
Jim Fulton


More information about the ZODB-Dev mailing list