Date variable

Anders Melchiorsen mail at spoon.kalibalik.dk
Wed Nov 4 16:33:24 MSK 2009


On Wed, 4 Nov 2009 18:41:42 +0700, Kiswono Prayogo <kiswono at gmail.com>
wrote:

>> Rather than rotating logs, I name my access log files like
>> access-YEAR-MONTH.log.
>
> cron everyday at 23:55 mv path/to/your/log `date +%Y%m%d`.log
> should do the same ^^

No, that is log rotation, and I don't like that because one has
to do things at exactly the right time to have everything end up
in the right place.

I find it nicer to just write to the final filename right away.


Anders.






More information about the nginx mailing list