A
A
Anton Khromov2018-02-06 17:46:41
Python
Anton Khromov, 2018-02-06 17:46:41

How to properly organize logging of all tasks in Celery?

Good day to all!
Need advice from people who have experience with Celery. Specifically, I am interested in the answer to the question: how to implement logging of all tasks using a custom logger / handler?
I want to use celery.Task.on_success and celery.Task.on_failure handlers, inside which I can write messages to logs about errors and successfully completed tasks. I do not understand how to set the logger correctly so that it is used, and not the default logger. Can python.logging be used for this task?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-02-06
@dimonchik2013

you can do anything with logging
https://www.youtube.com/watch?v=5lXYzRBOt10
https://www.youtube.com/watch?v=2As8RJyFp_A
+ somewhere else Imankulov's report

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question