Rename log file based on its content

Francis Daly francis at daoine.org
Wed May 3 20:29:09 UTC 2017


On Tue, May 02, 2017 at 02:37:30PM +0200, SARA QUISPE MEJIA wrote:

Hi there,

> I want to know How can I do for to rename a log file in function to the
> date of my log file ?
> I known that in a log file I could find differents dates but I want to save
> just the first date.

It is probably easiest to do this outside of nginx.

Rename ("mv") your log file to whatever name you want, then send a
USR1 signal to the nginx process.

http://nginx.org/en/docs/control.html

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list