Welcome! Log In Create A New Profile

Advanced

nginx dynamic logging behavior

Posted by nambrosch 
nginx dynamic logging behavior
November 02, 2012 03:32PM
hey all - i'm looking to move a bunch of our products from apache to nginx but i'm running into an issue of logging. currently with apache we use cronolog to output to access_log_MMDDYY where MMDDYY is dynamic. this is also done for error_log.

i understand the reasons for not allowing the output be piped to another application so i've given up on that approach.

i've also read about using a unix pipe/fifo combined with an entirely separate application for parsing.. don't really want to do that either since we moved away from that approach long ago.

i've been playing with the udplog plugin but once it's enabled i can't seem to write any logs to disk (access or error).. it's a one or the other sort of thing.

any idea where i can go from here? it would be amazing if i could specify something like this in my nginx.conf:

access_log logs/sitename_access_$MM$DD$YY.log

but i haven't been able to find any variables inside of nginx that will do that for me. i noticed that lighthttpd supports something like this however from my reading nginx is lightyears ahead of lighthttpd and i don't want to make the decision to swap now and regret it later.

thanks in advance!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 183
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready