Use Python standard logging in Celery

后端 未结 1 950
长发绾君心
长发绾君心 2021-02-12 13:26

I have to implement Celery in a pre-existing system. The previous version of the system already used Python standard logging.

My code is similar to the code below. Proce

相关标签:
1条回答
  • 2021-02-12 14:15

    You probably want this setting:

    CELERYD_HIJACK_ROOT_LOGGER = False
    

    Tell me how that works out.

    Btw, the reason it hijacks the root logger is because some badly written libraries sets up logging, something a library should never do, resulting in users experiencing no output from the celeryd worker :(

    0 讨论(0)
提交回复
热议问题