Welcome! Log In Create A New Profile

Advanced

ACCESS LOG - ROTATION BY TIME

Posted by Radek 
ACCESS LOG - ROTATION BY TIME
April 29, 2010 04:18AM
Hello,

i want to rotate logs without [i]HUP[/i] signal or [i]reopen[/i] utility.
I tried something like this:
[i]access_log /tmp/access_$date_gmt.log log;[/i]

then i see every second new access log:
[i]access_1272528056.log[/i]

but i need rotation every minute.
Is it possible do rotation by time every minute?

My vision of access log (date: 2010-04-29 10:14)

[i]access_2010-04-29-10-14.log[/i]
[i]access_14.log[/i]
[i]access_10_14.log[/i]
....

How i can specify time format?
My version of Nginx is 0.7.65
Re: ACCESS LOG - ROTATION BY TIME
May 04, 2010 03:15AM
No idea? :-(
Re: ACCESS LOG - ROTATION BY TIME
December 23, 2010 08:50AM
I have own solution which you can read at: http://linux-sysadmin.org/2010/12/best-way-for-nginx-logs-rotation/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 124
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