Reputation: 16032
I deployed a Celery app on Heroku, but I don't see any task related information in Heroku log (I know that tasks are actually executed). As far as I know Heroku automatically collects everything that was logged to stdout or stderr. Does Celery not log to stdout/stderr by default? Or do I need need to implement custom logging? I would expect to at least see something like "executing task X" in the logs.
Upvotes: 1
Views: 1997
Reputation: 22553
If your celery workers are issuing print statements or using the standard python logging classes, then you should see something that looks like this in your heroku logs:
2015-04-25T00:25:00.072929+00:00 app[celeryd.1]: [2015-04-25 00:25:00,072: INFO/Beat] Scheduler: Sending due task contest-winner (app.contest_win)
celeryd will be replaced by whatever you named the celery worker in your ProcFile. Mine looks like this and you can see the process label in the logging statement above:
celeryd: celery -A app.celery worker -E -B --loglevel=INFO
Of course, you have to set the log level too :).
Upvotes: 5