loggint through syslog
Ryan Malayter
malayter at gmail.com
Thu Dec 24 05:45:51 MSK 2009
On Sunday, December 20, 2009, Vinay Y s <lists at ruby-forum.com> wrote:
> try this:
> tail -f access.log | logger -p local5.err -t nginx
>
> you can ensure this is always running by using something like
> daemontools.
>
> Surely this will have worser performance than if it were implemented
> natively within nginx.
Interesting... Wouldn't that construct result in one massive syslog
entry containing many lines of the nginx log (possibly overflowing a
syslog max limit and truncating)? The default interval for tail -f
seems to be 1s. That could be solved by an intermediate process I
suppose.
Unfortunately, I see no mention of TLS support in the man pages for
logger, but I think you are on to something... good suggestion. The
efficency of tail -f is the deciding factor I think.
Coordinating with log rotations will also be somewhat tricky, but
probably do-able by watching the descriptor instead of the name and
re-starting the process at log rotation.
I still think native syslog in nginx is more desirable, of course.
Complexity is the enemy of both stability and security.
--
RPM
More information about the nginx
mailing list