[Twisted-Python] twisted.python.log usage...

Miguel Marques miguel at yorku.ca
Thu Sep 25 12:06:07 EDT 2003


I've just started using twisted and I have a question about logging.
I have a server which uses twisted.python.log.  I open a file and then
call log.startLogging with it.  I then start a number of worker threads and
then instantiate an Application and run it.   All log.msg from the
main program have the server name I passed when I instantiaed the Application.
When I call log.msg from the threads the name is just [-].
I know I can call msg with system='servername' everytime but I thought
that I could have the lass that implements the running worker threads
inherit from Logger and override logPrefix but that doesn't seem to work.
I obviously (or so I think) need to insert system='servername' in the ILogContext
for each of my threads but it isn't all that clear to me how to do that.
I'm confused (and I don't even have an opulent toilet ;-) )
TIA for any help...


C. Miguel Marques, Development Services, Computing and Network Services, York University
e-mail: miguel at yorku.ca, voice: (416)736-2100x22684, fax: (416)736-5830

More information about the Twisted-Python mailing list