[Twisted-Python] Multiple Sources for Logging

disappearedng disappearedng at gmail.com
Tue Aug 17 00:24:51 EDT 2010


Dear Everyone,

I am running WSGI inside my twisted server. I am currently using
startLogging, but I am interested in separating the two sources of logs into
different destinations, i.e. different log files. Take a look at my log:

2010-08-17 00:20:19-0400 [-] Log opened./
2010-08-17 00:20:19-0400 [-] twisted.web.server.Site starting on 11111
2010-08-17 00:20:19-0400 [-] Starting factory <twisted.web.server.Site
instance at 0x1e65b00>
2010-08-17 00:20:19-0400 [-]
mycode.code.comet.ProxiedComet.ProxiedCometFactory starting on 12346
2010-08-17 00:20:19-0400 [-] Starting factory
<mycode.code.comet.ProxiedComet.ProxiedCometFactory instance at 0x1e65e18>
2010-08-16 23:20:39-0500 [-] 127.0.0.1 - - [17/Aug/2010:04:20:38 +0000] "GET
/ HTTP/1.1" 404 2666 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;
rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8"
2010-08-16 23:20:39-0500 [-] 127.0.0.1 - - [17/Aug/2010:04:20:39 +0000] "GET
/favicon.ico HTTP/1.1" 404 2699 "-" "Mozilla/5.0 (X11; U; Linux x86_64;
en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8"
2010-08-16 23:20:42-0500 [-] 127.0.0.1 - - [17/Aug/2010:04:20:42 +0000] "GET
/favicon.ico HTTP/1.1" 404 2699 "-" "Mozilla/5.0 (X11; U; Linux x86_64;
en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8"

First 5 lines are twisted's , remaining are my WSGI *running django. How
should I structure my logging to be able to split accordingly?


Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20100817/5b6d1e5f/attachment.htm 


More information about the Twisted-Python mailing list