[Twisted-Python] Re: Python 2.3 logging package and Twisted...
Stuart Hungerford
stuart.hungerford at anu.edu.au
Mon Jun 23 22:35:31 MDT 2003
Itamar wrote:
| > 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
caution ;-)
Cheers,
Stu
--
Stuart Hungerford
ANU Internet Futures Project
More information about the Twisted-Python
mailing list