I agree that python logging is a bit homely, but didn't understand the up-front reasoning of this post, specifically the NIH part. I believe Python logging was modeled after Java logging which is why it is designed the way it is. Plenty of flexibility and lots of the associated grunt work too.
It needs to run under windows so hardcoding it to use syslog wouldn't make much sense, though I suppose the defaults per platform could be better.
Also, why is it important how Twisted does it? I don't see why one would use Twisted logging now that it exists in the stdlib.
Still I did enjoy the tips on using the syslog with python.
Working with the standard library logging module does make me feel like I have stepped out of Python land temporarily. But it does its job, and once it is configured for a project, I don't really think about it again.
Also, the maintainer of the module, Vinay Sajip, is on Stack Overflow and regularly answers logging questions.
Presumably with this method you can't selectively increase and decrease log levels for different components? That can be really useful in a large system where you don't want to generate several gigs of logging to sift through all the time, but sometimes you do want that extra detail to track down a tricky bug.
You can because you’re still using logging if you want. You only use a different ‘Handler’ which writes your entries to stderr instead of into a file. That’s the advantage of logging’s modularity.
In the examples, I set the log level to INFO for instance.
It needs to run under windows so hardcoding it to use syslog wouldn't make much sense, though I suppose the defaults per platform could be better.
Also, why is it important how Twisted does it? I don't see why one would use Twisted logging now that it exists in the stdlib.
Still I did enjoy the tips on using the syslog with python.