[mod_python] apache.log_error

Gregory (Grisha) Trubetskoy grisha at modpython.org
Wed Oct 8 21:12:47 EST 2003


You will have better luck on Windows with req.log_error than
apache.log_error, or you will have to call apache.log_error with the other
two optional arguments, level and server:

apache.log_error("blah", apache.APLOG_ERR, req.server)

I *think* (I haven't researched this too much) this is because on unix,
when req.server is omited, the function writes to stderr, which ultimately
ends up in the logs, but on windows, it goes nowhere.

But again, if you have a request object, always use:

req.log_error("blah")

Grisha

On Thu, 25 Sep 2003, Seung Chan Lim wrote:

> If I'm trying to spew error messages out to the default apache error log am
> I doing the right thing by using apache.log_error ??
>
> The problem is that I don't see anything on the default error log which I
> believe is Apache2/logs/error.log
>
> This is using mod_python 3.03
> Windows 2000
> Apache 2.0
> Python 2.2
>
> thanks
>
> slim
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list