syslog patch and 0.7.x
Joe Williams
joe at joetify.com
Fri Sep 4 21:22:30 MSD 2009
I am getting:
"[emerg]: unknown log format "main" in /opt/nginx/conf/nginx.conf"
Any ideas? Something wrong with my install/build?
-Joe
On Fri, 04 Sep 2009 17:05:56 +0200
Marlon de Boer <marlon at hyves.nl> wrote:
> 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
>
--
Name: Joseph A. Williams
Email: joe at joetify.com
Blog: http://www.joeandmotorboat.com/
More information about the nginx
mailing list