Re: httpd.conf - How to capture only 500 internal server errors?
I tried this and it did not work:
LogFormat "%t %U %q %h %u \"%r\" %s \"%{Cookie}i\" \"%{Referer}i\"
\"%{User-agent}i\"" logging500errors
SetEnvIf status 404 500env
CustomLog logs/apache/access_log_pod-500 logging500errors env=500env
What is the SetEnvIf directive to capture the return status?
NOTE: I tested 404 because it is easy to recreate.
- Shekar
On Jan 25, 11:37 am, Davide Bianchi <davideyeahs...@onlyforfun.net>
wrote:
> On 2007-01-25, Shekar <ctip...@gmail.com> wrote:
>
> > Is there any way to configure httpd.conf file to capture only 500
> > errors?The first thing that came to my mind is to use aSetEnvIfdirective
> to capture the error code and set a 'flag' if that is a 500, then
> use conditional logging to log only that.
>
> See the documentation aboutSetEnvIfand Conditional Logging if that
> is what you need.
>
> Davide
>
> --
> Q: What's another name for the "Intel Inside" sticker they put on Pentiums?
> A: Warning label.
|