Is there any other way to trigger log reopen beside kill -USR1?
Andre Jaenisch
andrejaenisch at googlemail.com
Thu Jan 24 17:48:16 UTC 2013
2013/1/24 Scott Ribe <scott_ribe at elevated-dev.com>:
> I think the suggestion about the symlink was to make sure that if/when nginx re-opens the file, it's actually opening the file you want it to--an alternative approach to what you're doing, which does not care when the file is re-opened.
Exactly. There's only one file to be opened (this one, which the
symlink points to) and thus less danger of race conditions.
2013/1/24 Jan-Philip Gehrcke <jgehrcke at googlemail.com>:
> Maybe I did not read carefully enough, but instead of relying on the $(date "+%Y%m%d") in the exact moment of renaming the file, you could use the last modification time of the file via. e.g.
>
> $ stat -c %y ~/.bashrc | awk '{print $1}'
> 2012-12-18
My version has no dashes :)
And you could adjust the modification to not take place at midnight,
couldn't you?
Regards, André
More information about the nginx
mailing list