by default does nginx just use a single log file?

Francis Daly francis at
Fri Dec 14 20:20:46 UTC 2012

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.

That's my understanding, anyway.

Francis Daly        francis at

More information about the nginx mailing list