Re: glue between apache and python logging

2005-10-20 Thread Nick
Jim Gallacher wrote: Beyond that it still segfaults for me. The other problem is that you are not removing the handler instance from the logging instance so you still have a memory leak. 100k requests would result in 100k handler instances. Oh, and there might be a bit of a performance issue

Re: glue between apache and python logging

2005-10-20 Thread Nic Ferrier
Jim Gallacher [EMAIL PROTECTED] writes: There is a typo in your code: s/logging.debug/logging.DEBUG/ Got me. It ran for me though... Beyond that it still segfaults for me. I can't get it to segfault. Can you share your test? The other problem is that you are not removing the handler

Re: glue between apache and python logging

2005-10-19 Thread Nick
Nic Ferrier wrote: Nick [EMAIL PROTECTED] writes: Nic Ferrier wrote: I just joined this list (at the suggestion of Graham Dumpleton) to try and get you guys to consider adding some glue to connect python 2.2 logging to Apache's logging. I have done this before, and although I haven't

Re: glue between apache and python logging

2005-10-19 Thread Nicolas Lehuen
Nic, there is something I need to understand before giving my advice on the subject. I'm not familiar with the logging API, can you tell me how you configure Python to use this logging implementation ? Looks like we have to manipulate configuration object, set up handlers and so on... If so I

Re: glue between apache and python logging

2005-10-19 Thread Nicolas Lehuen
OK now this is totally weird, we've got a Nic, a Nick and a Nicolas in the thread, watch out for mass confusion !2005/10/19, Nicolas Lehuen [EMAIL PROTECTED]:Nic, there is something I need to understand before giving my advice on the subject. I'm not familiar with the logging API, can you tell me

Re: glue between apache and python logging

2005-10-19 Thread Nicolas Lehuen
2005/10/19, Nic Ferrier [EMAIL PROTECTED]: Is everyone here called Nic[h]olas?Nicolas Lehuen [EMAIL PROTECTED] writes: Nic, there is something I need to understand before giving my advice on the subject. I'm not familiar with the logging API, can you tell me how you configure Python to use this

Re: glue between apache and python logging

2005-10-19 Thread Jim Gallacher
Nicolas Lehuen wrote: 2005/10/19, Nic Ferrier [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Is everyone here called Nic[h]olas? Nicolas Lehuen [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] writes: Nic, there is something I need to understand before giving my advice on the

Re: glue between apache and python logging

2005-10-19 Thread Nic Ferrier
Nicolas Lehuen [EMAIL PROTECTED] writes: In that case, setting up the logging handler should be done by the user, making sure that it is set up only once per interpreter, even in the context of a multi-threaded MPM. It's not a trivial thing ; looks like this is a job for PythonImport. Hang

Re: glue between apache and python logging

2005-10-19 Thread Nic Ferrier
Nick [EMAIL PROTECTED] writes: Maybe I just don't have enough exposure, but I don't see the logging module used as ubiquitously as you seem to imply. I could agree with you if logging was used everywhere, even in Python and its standard modules. I could be wrong, but I just don't see it.

Re: glue between apache and python logging

2005-10-19 Thread Nic Ferrier
Nicolas Lehuen [EMAIL PROTECTED] writes: One thing to remember : every piece of code we introduce into mod_python is a liability. We'll have to support it and I can't wait for having to solve setup problems of people asking the list where are my log entries going ? or my log entries are

Re: glue between apache and python logging

2005-10-19 Thread Nic Ferrier
distribution include a module that provides the glue between Apache logging and Python logging. Having mod_python create the logger would not be right IMHO because it is unnecessary for code that doesn't use logging or uses Apache logging directly. Here are some further things to consider

Re: glue between apache and python logging

2005-10-19 Thread Nick
Nic Ferrier wrote: But it's difficult to change your mind if you say prove that logging is the most widely used logging available and then I'll think about it but I don't use it anyway because I wrote my own. Well, that's not what I said. What I said was: 1. I'm not convinced that a logger

Re: glue between apache and python logging

2005-10-19 Thread Jorey Bump
Where do I file a documentation bug? Rule #6 appears to be missing. ;) Sydney Nolan Nick wrote: In that case, let us just apply Rule #6 to this situation. Bruce Jim Gallacher wrote: Well, this is python, so everyone really should be called Bruce. Maybe that will help. Regards, Bruce

glue between apache and python logging

2005-10-18 Thread Nic Ferrier
Hello mod_python developers. I just joined this list (at the suggestion of Graham Dumpleton) to try and get you guys to consider adding some glue to connect python 2.2 logging to Apache's logging. This means adding a small extra source file to the mod_python codebase. Here's my example: # A