zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Bangert <...@groovie.org>
Subject Re: Modifying log level in python libraries
Date Fri, 21 Sep 2012 00:41:52 GMT
On Sep 20, 2012, at 4:52 PM, Ben Tomasini <ben.tomasini@gmail.com> wrote:

> I am using the zookeeper Python bindings and am trying to suppress the
> INFO level log messages it is producing.  I am new to Python logging.
> I tried reconfiguring it with the following to no avail:
> logging.basicConfig(level=logging.ERROR)

Could you be a little more specific on what library you're using to talk to Zookeeper?

What you've written there will work.... if the code uses the Python standard logging library,
which the Python C binding and C lib does not. I'd suggest trying Kazoo which is a pure Python
Zookeeper library that uses standard Python logging calls.

Also, logging.ERROR is pretty catastrophic, so most libraries ideally will never show anything
at that level unless something horrible happened. Try setting it to logging.INFO or logging.DEBUG
for more verbose messages.


View raw message