Syslog support for nginx

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,

At my work we use syslog to maintain all logs on a central place. We
really missed the syslog support in nginx so I created a patch which
allows syslog logging. Patch was diffed against 0.6.31, but also applies
to 0.6.29 and 0.6.30.

Regards,

Marlon de Boer
System administrator Hyves.nl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFILFgLQ6KLqYkbN3cRAgjQAKCh79j4ObzD37HIHPJfewEM4ZitCwCgwjLx
rybaTVlNBtpcobjZyKF7sS0=
=6uND
-----END PGP SIGNATURE-----

Marlon de Boer wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,

At my work we use syslog to maintain all logs on a central place. We
really missed the syslog support in nginx so I created a patch which
allows syslog logging. Patch was diffed against 0.6.31, but also
applies to 0.6.29 and 0.6.30.

Oh fantastic! Thanks!

Ed W

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marlon de Boer wrote:
| At my work we use syslog to maintain all logs on a central place. We
really missed the syslog support in nginx so I created a patch which
allows syslog logging. Patch was diffed against 0.6.31, but also applies
to 0.6.29 and 0.6.30.
|
Please do not use the previous posted patch because it contains a bug
with buffer allocation. I’ve attached a new one that solved the issue. I
used strncpy() and calloc() in my patch, which according documentation
should be portable between most unix systems.

You can enable syslog support via the configure script using
–with-syslog.

Regards,
Marlon de Boer
System administrator Hyves.nl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFILV2jQ6KLqYkbN3cRAoxQAJ4sksTYLQ2JahieHcleINx/YKAxyACgtWYG
s2X5WQMs8Esx6WQnijl7BFc=
=+YC/
-----END PGP SIGNATURE-----

Marlon de Boer wrote:

with buffer allocation. I’ve attached a new one that solved the issue.
I used strncpy() and calloc() in my patch, which according
documentation should be portable between most unix systems.

You can enable syslog support via the configure script using
–with-syslog.

Regards,
Marlon de Boer
System administrator Hyves.nl

Igor, any chance of this appearing in a future nginx release please?

Ed W

Ed W wrote:

Igor, any chance of this appearing in a future nginx release please?

Ed W

If you want to publish or intergrate the patch, please use the one
attached. I fixed a bug with the syslog format string which crashed
nginx when the log string contained a %s, %d, etc (all printf format
strings). Latest patch is running fine for 3 weeks now, generating 270G
of raw text logging over tcp syslog daily.

Regards,
Marlon de Boer
System administrator Hyves.nl