Save rake background task to log? (Using Resque)

Go To


This is very simple I guess, but still.. I have a background task with Resque that is failing and the output is too long to see in Terminal window.. I think it's time to log it. I execute it through

bundle exec env rake resque:work QUEUE='*'

Question is - how do I save that output to log file?

I looked at logging (development.log and it's not showing there of course, b/c it's happening on rake side)...


2012-04-03 20:14
by Stpn


Take a look at this pull request:

And read the readme. Have you tried to set VVERBOSE=1?

You could just send the output to a file:

bundle exec env rake resque:work QUEUE='*' >> log/resque.log

I run resque like that on my server

nohup bundle exec rake resque:work QUEUE=general PIDFILE=tmp/pids/ & >> log/resque_worker_QUEUE.log 2>&1

Can't tell you it's the best way, but it works.

2012-04-03 20:19
by Robin
this file contains just (in - Stpn 2012-04-03 20:23