Skip to content

Feature request: Create a config option for Celery to not touch logging config anywhere ever #1867

@jdelic

Description

@jdelic

Working with Celery in a more complex environment, like ours, is very frustrating because it seems to remove handlers and then seemingly sets up arbitrary loggers (like a kombu.log.NullHandler for the 'celery' logger). This is done even when we set CELERYD_HIJACK_ROOT_LOGGER and CELERY_REDIRECT_STDOUTS to False.

At my company we have a default config for the logging module which we want all services to use all the time with no exceptions (because these messages get picked up and reformatted by logstash/logstash-forwarder and put into elasticsearch). The only way to use this with Celery currently seems to bring Celery up then iterate through all loggers and remove them forcefully and then set up a sane logging configuration. Which means we set logging up twice in our environment, with the alternative being to patch Celery or monkey-patch Celery.

So my feature request is this: I'd like to set CELERY_I_HUMBLY_REQUEST_YOU_STOP_EFFING_WITH_MY_LOGGING = True and then Celery should just not do anything to logging at all aside from writing log messages.

I apologize if this is already possible and I just missed the adequate settings in the docs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions