Welcome! Log In Create A New Profile

Advanced

Re: by default does nginx just use a single log file?

m irya
December 14, 2012 04:44PM
Nginx doesn't include periodic log rotation functionality, the only thing
included is reopening the log files on USR1 signal, so one may rename the
current log file and then kill -USR1 `cat /var/run/nginx.pid` for nginx to
create a new log (see http://wiki.nginx.org/LogRotation ). External tools
may be used to do the actual period rotation, like in Linuxish world it's
normally done by logrotate (
http://manpages.ubuntu.com/manpages/lucid/man8/logrotate.8.html ) - in
recent Ubuntu versions it's already set up to rotate default nginx log
files.


2012/12/14 S Ahmed <sahmed1020@gmail.com>

> only on a full moon, excluding leap years. thank you and when can I
> expect this feature? :)
>
>
> On Fri, Dec 14, 2012 at 3:20 PM, Francis Daly <francis@daoine.org> wrote:
>
>> On Fri, Dec 14, 2012 at 03:00:53PM -0500, S Ahmed wrote:
>>
>> Hi there,
>>
>> > By default does nginx just keep appending to the same log file? (for
>> both
>> > access and error log files)
>>
>> Yes. (Although the access log file name can include per-request
>> variables.)
>>
>> > Is there a reason why there is no built in way of having it create a new
>> > file per day/hour or something? I guess the idea is to keep the feature
>> > set very lean?
>>
>> Would you like it per day or per hour? Or every 4 MB, or every 1 million
>> lines? (Or every second Tuesday unless the moon is full?) There are too
>> many possibly-useful rules for anything built-in to satisfy everybody.
>>
>> So nginx allows you to choose whatever combination of circumstances you
>> want, outside of nginx, and then provides a well-defined way for you to
>> induce a log file rotation.
>>
>> http://nginx.org/en/docs/control.html#logs
>>
>> That's my understanding, anyway.
>>
>> f
>> --
>> Francis Daly francis@daoine.org
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

by default does nginx just use a single log file?

S Ahmed December 14, 2012 03:02PM

Re: by default does nginx just use a single log file?

Francis Daly December 14, 2012 03:22PM

Re: by default does nginx just use a single log file?

S Ahmed December 14, 2012 04:12PM

Re: by default does nginx just use a single log file?

m irya December 14, 2012 04:44PM

Re: by default does nginx just use a single log file?

S Ahmed December 14, 2012 05:12PM

Re: by default does nginx just use a single log file?

Igor Sysoev December 15, 2012 04:46AM

Re: by default does nginx just use a single log file?

S Ahmed December 15, 2012 01:22PM

Re: by default does nginx just use a single log file?

Igor Sysoev December 15, 2012 03:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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