# Is there any other way to trigger log reopen beside kill -USR1?

**URL:** <https://www.ruby-forum.com/t/is-there-any-other-way-to-trigger-log-reopen-beside-kill-usr1/229558>\
**Category:** NGINX\
**Created:** [January 23, 2013, 4:30am UTC](https://www.ruby-forum.com/t/is-there-any-other-way-to-trigger-log-reopen-beside-kill-usr1/229558 "2013-01-23T04:30:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![landlord01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/8baadc/32.png) [@landlord01](https://www.ruby-forum.com/u/landlord01)\
**Post date:** [January 23, 2013, 4:30am UTC](https://www.ruby-forum.com/t/is-there-any-other-way-to-trigger-log-reopen-beside-kill-usr1/229558/1 "2013-01-23T04:30:19Z")

</div>

Hi all,

In the common case, people rotate access log like this:

mv access.log access.XXX.log  
kill -USR1

In my case, I have to do something like this:

if [-f “access.log”]; then  
mv access.log access.20130121.log  
fi

kill -USR1   
mv access.log access.20130122.log

My goal is make the “current” log file named with the date pattern  
immediately, not after one day. Well, my script seams OK, but for a  
production script, I still worry about that is there any “unexpected”  
trigger can make nginx reopen the log file (I mean inside nginx, core  
and other modules)? Will there be any inside reopen action in the  
future?
