[mod_python] mod_python debug level message not logged

Graham Dumpleton graham.dumpleton at gmail.com
Mon Nov 17 20:18:06 EST 2008


If they are not working, then you haven't set LogLevel directive in
Apache to sufficient high level to allow stuff through. Set:

  LogLevel debug

in main part of Apache configuration, ie., outside of VirtualHost, and
see if it makes a difference.

PS, please use reply-all and keep discussion on the list.

Graham

2008/11/18 Annie Wang <aw1179 at yahoo.com>:
> Hi Graham,
>
> So I can use apache.main_server.log_error() instead of apache.log_error(),
> right ?  I tried that and it didn't work.  I also tried
> apache.log_error(msg, level, apach.main_server) and didn't work either.
> Is there other alternative way to do logging for debug/info level messages ?
>
> Thanks,
> Annie
>
> ________________________________
> From: Graham Dumpleton <graham.dumpleton at gmail.com>
> To: Annie Wang <aw1179 at yahoo.com>
> Cc: mod_python at modpython.org
> Sent: Monday, November 17, 2008 4:55:31 PM
> Subject: Re: [mod_python] mod_python debug level message not logged
>
> 2008/11/18 Annie Wang <aw1179 at yahoo.com>:
>> I think my problem is record.__dict__['server'] raised an exception and it
>> is just calling apache.log_error(record.getMessage(), level) without the
>> server parameter so only warn/error messages made it to the error_log. So
>> my
>> question is, how do I get a hold of this server object other than from the
>> request object ?
>
> If you are after server object for the virtual host, there is no other
> way of getting it except via request object.
>
> Only other server object available is that for main server, which from
> memory is apache.main_server.
>
> Graham
>
>


More information about the Mod_python mailing list