What is the difference between get logger functions from celery.utils.log and logging?

I tried to figure out the difference between the python logger and the celery logger, in particular the difference between the commands below, but I can not find a good answer.

I am using celery v3, with django 1.10.

from celery.utils.log import get_task_logger
logger = get_logger(__name__)
...
from celery.utils.log import get_task_logger
logger = get_task_logger(__name__)
...
import logging
logger = logging.get_logger(__name__)

The documentation for celery ( latest , v3.1 ) is sorely lacking on this topic. I looked at similar issues like this one , but it’s still unclear what to use, why to use it, and in particular, what are the differences. I am looking for a clear and concise answer.

I also use sentinel in my work environment. How does this choice affect your watch magazines? i.e. these general settings

+4
1

get_task_logger, , , Sentry.

  • , ( , celery.task)
  • , Sentry - , Sentry.

: , Sentry:

https://docs.sentry.io/clients/python/integrations/celery/

, Sentry - , , + , , , throws .

+3

Source: https://habr.com/ru/post/1674392/


All Articles