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:Igor Sysoev (is-G@public.gmane.org)
Date:Jul 19, 2007 12:52:38 pm
List:ru.sysoev.nginx

On Thu, Jul 19, 2007 at 03:38:06PM -0400, Paul Dlug wrote:

On 7/19/07, Ezra Zygmuntowicz <ezmo@public.gmane.org>
wrote:

You can use the geo module to not log load balancer health checks like this:

# include the load balancers we want omitted from the access log # http://wiki.codemongers.com/HWLoadbalancerCheckErrors geo $lb { default 0; 10.0.0.1/32 1; # LB IPs 10.0.0.3/32 1; }

# then inside of your server {} block use this error handler:

error_page 400 /400; location = /400 { if ($lb) { access_log off; } return 400; }

That's great, thanks for that. Another related question, can I disable a specific access log if I have multiples?

Any access_log directive at some level disables all inherited directives:

server { access_log one; access_log two; access_log three;

location /dir { access_log two; }