I\'m using Django 1.10, python 3.5 and celery 4.1.0 I\'m trying to log celery tasks info into a file. So I tried as suggested in celery documentation -
from cele
I was fiddling my logging this morning trying to figure out why my log was not progagated to the root logger, turned out as what @georgexsh said, celey is hijacking the root logger, here is my working logger config:
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
'cal': {
'handlers': ['general'],
'level': 'INFO',
'propagate': True,
},
'': {
'handlers': ['gelf'],
'level': 'INFO',
}
}
And with CELERYD_HIJACK_ROOT_LOGGER = False
in the settings.
All the celery logs are now going to graylog(defined in root) instead of the usual place.