使Python Logging与Celery异步工作

时间:2012-10-04 00:35:09

标签: logging celery

我有日志设置。特别是,我有SMTPHandler。我想让它发生异步。我想用芹菜来实现这一目标。这可能吗?

import logging
logger = logging.getLogger("logger")

mail_handler = STMPHandler(...)
mail_handler.setLevel(logging.ERROR)
...
logger.addHandler(mail_handler)

0 个答案:

没有答案