librelist archives

« back to archive

log rotation in resque

log rotation in resque

From:
Michal Muczynski
Date:
2012-08-09 @ 16:19
<mailto:resque@librelist.com>Hello all,

I'm having a problem with logrotating resque.log. I couldn't find an 
option to reload resque process. I haven't find information about 
possible use of -HUP signal, -USR1 is reserved for killing child processes.

I'd be very grateful if you could point me how to force resque to reload 
which is neccessary for rotating logs. As a workaround I can -QUIT 
resque and use god to start it again, but I would rather to use only 
logrotate machnism for accompish the job.

thanks in advance!

-- 
Regards,
Michal Muczynski

Re: [resque] log rotation in resque

From:
Luke Antins
Date:
2012-08-14 @ 23:00
Michal,

Are you redirecting the STDOUT logging to rescue.log?
If so, take a look here:
http://superuser.com/questions/291368/log-rotation-of-stdout

Or is your worker code logging to a file?
If so, you'll want to register for a signal like HUP yourself and call
the appropriate methods to open a new log file.

Hope this helps.

Luke

On 9 August 2012 17:19, Michal Muczynski <mmuczynski@clixxie.de> wrote:
> Hello all,
>
> I'm having a problem with logrotating resque.log. I couldn't find an option
> to reload resque process. I haven't find information about possible use of
> -HUP signal, -USR1 is reserved for killing child processes.
>
> I'd be very grateful if you could point me how to force resque to reload
> which is neccessary for rotating logs. As a workaround I can -QUIT resque
> and use god to start it again, but I would rather to use only logrotate
> machnism for accompish the job.
>
> thanks in advance!
>
> --
> Regards,
> Michal Muczynski