Re: [Twisted-Python] Persuading Python's Logging to use twisted.logger

2016-05-24 Thread Glyph
> On May 24, 2016, at 4:10 PM, Daniel Sutcliffe wrote: > >> The main reason I wanted to do the format-string translation is that it >> would allow the key/value pairs to be stored according to the same idiom >> that Twisted uses, and therefore be serialized to jsonFileLogObserver and >> conse

Re: [Twisted-Python] Persuading Python's Logging to use twisted.logger

2016-05-24 Thread Daniel Sutcliffe
On May 10, 2016, at 4:23 PM, Daniel Sutcliffe wrote: >> Thanks for all the hints and suggestions guys, this was far simpler >> than I thought it would be and the results are exactly what I imagined >> without too much effort. On Sat, May 21, 2016 at 9:44 PM, Glyph wrote: > Fantastic! [...] >> G

Re: [Twisted-Python] Persuading Python's Logging to use twisted.logger

2016-05-21 Thread Glyph
> On May 10, 2016, at 4:23 PM, Daniel Sutcliffe wrote: > > Thanks for all the hints and suggestions guys, this was far simpler > than I thought it would be and the results are exactly what I imagined > without too much effort. Fantastic! > Jeff: Have to admit I started with your code and had i

Re: [Twisted-Python] Persuading Python's Logging to use twisted.logger

2016-05-10 Thread Daniel Sutcliffe
Thanks for all the hints and suggestions guys, this was far simpler than I thought it would be and the results are exactly what I imagined without too much effort. Jeff: Have to admit I started with your code and had it working with in my scenario in no time at all, this was a great bump start, bu

Re: [Twisted-Python] Persuading Python's Logging to use twisted.logger

2016-05-09 Thread Burak Arslan
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

Re: [Twisted-Python] Persuading Python's Logging to use twisted.logger

2016-05-09 Thread Kevin Conway
> The reverse mechanism of sending twisted.logger's output to the > standard library is of course handled by the > twisted.logger.STDLibLogObserver (and similar in twisted legacy > logging) but the documentation for this even suggests why this is a > bad idea: 'Warning: specific logging configurati

Re: [Twisted-Python] Persuading Python's Logging to use twisted.logger

2016-05-09 Thread Glyph
> On May 9, 2016, at 1:50 PM, 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

Re: [Twisted-Python] Persuading Python's Logging to use twisted.logger

2016-05-09 Thread Jeffrey Ollie
Here's a snippet that shows how I've handled it. This example uses the new style of logging in Twisted but would work just as well in the old style. I'm not sure if there's a label that you can supply to the logging.Handler to handle all messages but that's probably just a matter of digging into t

[Twisted-Python] Persuading Python's Logging to use twisted.logger

2016-05-09 Thread Daniel Sutcliffe
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