
hello, On 05/09/16 23:50, Daniel Sutcliffe wrote:
The project I am working on uses pymodbus which I am sure shares a fairly common attribute with many other modules of using Python's standard Logging mechanism - a very reasonable choice even for a module that supports Twisted, the library can also be used entirely synchronously and thus would not want a required dependency of Twisted.
It struck me that it would be great to be able to redirect the standard logging library to use twisted.logger
me too :)
'Warning: specific logging configurations (example: network) can lead to this observer blocking.' which seems to me why it would be better to attempt this the other way around...
as discussed, it's possible. you additionally need to make sure to clean other handlers if you are integrating with third party libraries who may be adding esoteric targets for log entries behind your back. with that said, here's my take at it: https://github.com/plq/neurons/blob/40dff6134330aeadbefd3973d5d40aa4bfac4b78... best, burak