Conditional logging
Kiril Angov
kupokomapa at gmail.com
Thu Jul 19 21:59:39 MSD 2007
Paul Dlug wrote:
> Is there a way to log conditionally? For example, I have a load
> balancer checking a URL on nginx as a health check, there are a lot of
> them so I don't want them in my main log. Is there a way I can log
> conditionally based on IP or URL?
>
>
> Thanks,
> Paul
>
>
Hi Paul,
looking at on of the full configuration files on the nginx wiki you can
see these lines:
location ~* ^.+\.(jpg|jpeg|gif)$ {
root /spool/www;
*access_log off;*
expires 30d;
}
http://wiki.codemongers.com/NginxFullExample2
Maybe there is a better way to achieve your goal,
Kiril
More information about the nginx
mailing list