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
By default, celery will reset handers on celery.task
logger, you could disable this behavior with worker_hijack_root_logger option. Or, you could reconfigure this logger in after_setup_task_logger signal, even dont let celery config the loggers with setup_logging signal:
from celery.signals import setup_logging
@setup_logging.connect()
def config_loggers(*args, **kwargs):
from logging.config import dictConfig
dictConfig(app.config['LOGGING_CONFIG'])