syslog patch and 0.7.x
Marlon de Boer
marlon at hyves.nl
Fri Sep 4 19:05:56 MSD 2009
Joe Williams wrote:
> I got it to compile with the patch by removing "-Wall" and "-Werr"
> references from "auto/cc/gcc" but it doesn't seem to log anything. I
> still see output to the normal nginx logs but nothing to my rsyslog
> server. Is there any additional configuration or switches I need to get
> this rolling? I did the configure with '--with-syslog'.
>
> Thanks.
> -Joe
>
>
I just use the following in nginx (any file will do because it wouldn't
use it):
access_log /var/log/nginx/access_fifo main;
error_log /var/log/nginx/error_fifo error;
and in syslog-ng (useful part):
filter f_nginx_access { program("nginx") and level(notice); };
filter f_nginx_error { program("nginx") and level(crit); };
destination nginx_access { tcp("loghost");
file("/var/log/nginx/access_log"); };
destination nginx_error { tcp("loghost");
file("/var/log/nginx/error_log"); };
log { source(src); filter(f_nginx_access); destination(nginx_access); };
log { source(src); filter(f_nginx_error); destination(nginx_error); };
Regards
Marlon
More information about the nginx
mailing list