Thanks. I thought I was using the Python C binding lib. I will try using the Kazoo lib instead.
FWIW, Here is the log output I am trying to suppress: 2012-09-20 18:54:44,410:36343(0x7fff7a3cb960):ZOO_INFO@log_env@712: Client environment:zookeeper.version=zookeeper C client 3.4.3 2012-09-20 18:54:44,411:36343(0x7fff7a3cb960):ZOO_INFO@log_env@716: Client environment:host.name=btomasini-mac1.local 2012-09-20 18:54:44,411:36343(0x7fff7a3cb960):ZOO_INFO@log_env@723: Client environment:os.name=Darwin 2012-09-20 18:54:44,411:36343(0x7fff7a3cb960):ZOO_INFO@log_env@724: Client environment:os.arch=11.4.0 Ben On Thu, Sep 20, 2012 at 5:41 PM, Ben Bangert <[email protected]> wrote: > On Sep 20, 2012, at 4:52 PM, Ben Tomasini <[email protected]> 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. > > Cheers, > Ben >
