logging within celery processes

61 views
Skip to first unread message

Mike

unread,
Apr 21, 2013, 12:51:06 AM4/21/13
to django...@googlegroups.com
I'm trying to get logging to work from within my celery process.  I have set:
CELERY_SEND_TASK_ERROR_EMAILS = True
in settings.py

within the process I am logging to level INFO:

logger.info('some info')

I launch the process using supervisor:

python manage.py celery worker --loglevel=ERROR

The problem is, I'm getting emails from the INFO level messages even though I specified ERROR on the command line.  Is this a bug?

Shawn Milochik

unread,
Apr 21, 2013, 1:02:59 AM4/21/13
to django...@googlegroups.com
I don't know the solution, but we had the same problem. We ended up dumping Celery in favor of rq. It's much easier to work with and we were already using Redis as a back-end.

If you do figure out the solution to this, please post it here. Also, consider rq. We used Celery quite a bit and the changeover was fairly simple.

For the record, the logging was not the main reason we dumped Celery. Workers were also mysteriously locking up for some reason, and we couldn't narrow it down to any of our tasks, nor even the async versus the cron-style tasks. This is after running Celery for over two years on the same server so it could be due to the evolution of our codebase rather than Celery, but we wasted too many hours on it to want to deal with it.

Ask Solem

unread,
Apr 21, 2013, 4:31:10 PM4/21/13
to django...@googlegroups.com
CELERY_SEND_TASK_ERROR_EMAIL is not connected to logging,
so if you receive "some info" by mail, then it's not being sent by celery, you must
have configured something else to send that mail!

 
Reply all
Reply to author
Forward
0 new messages