[SPAM] Re: [mod_python] mod_python debug level message not logged

Annie Wang aw1179 at yahoo.com
Mon Nov 17 21:01:01 EST 2008


Thank you for all your help.  My httpd.conf for LogLevel was set to debug but I final figured what I did wrong; I made the change to the ApacheLogHandler which didn''t work however I realized I made change to the wrong file so I tried the change to the log.py and voila, it works. 

Now my next question is, I want to log all the application messages to a separate file not the apache error_log.  How do I go about doing this? 

Thanks,
Annie




________________________________
From: Graham Dumpleton <graham.dumpleton at gmail.com>
To: Annie Wang <aw1179 at yahoo.com>
Cc: mod python <mod_python at modpython.org>
Sent: Monday, November 17, 2008 5:18:06 PM
Subject: Re: [mod_python] mod_python debug level message not logged

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
>
>



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20081117/74c78dfc/attachment.html


More information about the Mod_python mailing list