Hi, I want to ditch Apache and use ZServer directly... but I got Apache to write HTTP_AGENT and HTTP_REFERER to the access log file, which medusa doesn't do. I couldn't find a way to customize the logs in medusa in the docs and after a quick look through the code. Is it possible? Or can anyone point me to the place in the code to add a patch? Thanks Itai -- Itai Tavor -- "Je sautille, donc je suis." -- itavor@vic.bigpond.net.au -- - Kermit the Frog -- -- 'Supposing a tree fell down, Pooh, when we were underneath it?' -- -- 'Supposing it didn't,' said Pooh after careful thought. --
Hi - I wanted to do this too, so here's a patch to the medusa part of ZServer to make it do Apache extended log format style logs. I also found it useful to change z2.py to use rotating_file_logger instead of file_logger, which does automatic log rotation for me. Change: lg = logger.file_logger(LOG_PATH) to lg = logger.rotating_file_logger(LOG_PATH, 'weekly') for example, to do weekly log rotation. Check out ZServer/medusa/logger.py for more cool options (syslog, socket logging, etc.). --Brian Hooper Itai Tavor <itavor@bigpond.net.au> wrote:
Hi,
I want to ditch Apache and use ZServer directly... but I got Apache to write HTTP_AGENT and HTTP_REFERER to the access log file, which medusa doesn't do. I couldn't find a way to customize the logs in medusa in the docs and after a quick look through the code. Is it possible? Or can anyone point me to the place in the code to add a patch?
Thanks
Itai -- Itai Tavor -- "Je sautille, donc je suis." -- itavor@vic.bigpond.net.au -- - Kermit the Frog -- -- 'Supposing a tree fell down, Pooh, when we were underneath it?' -- -- 'Supposing it didn't,' said Pooh after careful thought. --
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
At 12:15 PM 9/10/99 +1000, Itai Tavo wrote:
I want to ditch Apache and use ZServer directly... but I got Apache to write HTTP_AGENT and HTTP_REFERER to the access log file, which medusa doesn't do. I couldn't find a way to customize the logs in medusa in the docs and after a quick look through the code. Is it possible? Or can anyone point me to the place in the code to add a patch?
There's unfortunately no easy way to customize this yet. Making the hit logs more flexible is on my ZServer TODO list. If you're brave take a look at ZServer/medusa/http_server.py in the http_request.log method. Unfortunately the CGI environment variables are not stored in the http_request object, so it's gonna take some work. You may want to check out LoggingProducer in ZServer/Producers.py. Good luck. -Amos
participants (3)
-
Amos Latteier -
Brian Hooper -
Itai Tavor