taobao/tengine — pull request #90 by cfsego (2012-10-18 09:36:54+00:00)
Title: conditional log for tengine.

example:
http {

log_filter tmd {
bypass_if ($uri = '/us') and;
bypass_if ($status = 200);
}

log_filter tmd1 {
bypass_if ($uri = '/usr');
sample .25;
}

log_filter tmd2 {
sample 1;
}

server {
listen 3130 default;

log_filter_bypass_if ($status = 200) and;
log_filter_bypass_if ($uri = '/us');
log_filter_sample 0.5;

location /us {
empty_gif;

access_log logs/access6.log combined filter=tmd1;
access_log logs/access7.log combined;
}

location /usr {

empty_gif;

access_log logs/aaaa;
access_log logs/access1.log combined ratio=.25;
access_log logs/access2.log combined filter=tmd;
access_log logs/access3.log combined filter=tmd1 ratio=.1;
access_log logs/access4.log combined filter=tmd2 ratio=.2;
access_log logs/access5.log combined ratio=.5 filter=tmd2;
# access_log logs/access2.log combined filter=tmd2 filter=tmd1; it is invalid
}

location /proxy {
proxy_pass http://sport.sina.com.cn;
}
}
}