[Twisted-Python] Re: Python 2.3 logging package and Twisted...
stuart.hungerford at anu.edu.au
Tue Jun 24 00:35:31 EDT 2003
| > In applications using Twisted.web is writing logs with this
| > new module the kind of operation that would need to be done in
| > a deferred?
| Uh. It can't be *blocking*. Writing to a log file is fine. Writing to a
| socket would block, so don't do that. Using a Deferred doesn't magically
| make it not block.
| > I understand there's also twisted.python.log, but the issue
| > comes up for applications being moved to Twisted that already
| > use external logging libraries.
| You can use it, sure, or whatever library you want, as long as they
| don't block. In fact you can hook up logging to t.p.log too if you want
| (log.addObserver with a little glue function.)
I don't think I asked the original question very clearly. What I
should of asked is "has anyone using the new 2.3 logging package
found blocking behaviour?". Yes would mean I'd have to handle the
logging with a different package.
As it turns out, the new logging package can listen on a socket for
configuration instructions and it uses threading locks to ensure
thread-safety of its shared data structures, so I'm proceeding with
ANU Internet Futures Project
More information about the Twisted-Python