zinic / pyrox

The high-speed HTTP middleware proxy for python
MIT License
37 stars 9 forks source link

Logging disabled in pyrox.log #43

Closed jon-armstrong-zz closed 9 years ago

jon-armstrong-zz commented 9 years ago

After banging my head trying to figure out why pyrox isn't logging, it looks like logging is disabled in the code itself? Why? https://github.com/zinic/pyrox/blob/5318b2422e91a7c781b2148ff8aa6304dc9818f2/pyrox/log.py#L45

zinic commented 9 years ago

Ah, this is done to enforce root-level inheritance of logging levels. As per the logging documentation, hierarchical loggers will inherit their parent logger's level if a level value of 'NOTSET' is set.

jon-armstrong-zz commented 9 years ago

I see. I am not very familiar with logging in python. It looks like logging.basicConfig() is what I need to enable the initial logging. However, it also looks like configure() is never called on the LoggingManager, so the logging settings from the config are never applied.

zinic commented 9 years ago

You are correct! This has now been fixed