7 messages in ru.sysoev.nginxRe: Conditional logging
FromSent OnAttachments
Paul DlugJul 19, 2007 10:19 am 
Kiril AngovJul 19, 2007 10:59 am 
Paul DlugJul 19, 2007 11:41 am 
Ezra ZygmuntowiczJul 19, 2007 11:46 am 
Paul DlugJul 19, 2007 12:37 pm 
Igor SysoevJul 19, 2007 12:52 pm 
Igor SysoevJul 19, 2007 12:54 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Conditional loggingActions...
From:Kiril Angov (kupo@public.gmane.org)
Date:Jul 19, 2007 10:59:16 am
List:ru.sysoev.nginx

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?

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