Supervisord / Celery Output Logs

I use Supervisor to control celery. The celery supervisor configuration file contains the following 2 entries:

stdout_logfile = /var/log/supervisor/celery.log
stderr_logfile = /var/log/supervisor/celery_err.log

What bothers me is that, despite the fact that Celery is working correctly and all tasks have been completed successfully, they are all written on celery_err.log. I thought it would be only for mistakes. The celery.log file shows only the usual celery loading information. Is the behavior of the correct entry for the successful completion of a task in the error log?

Note - the tasks will certainly succeed (sent emails, db records, etc.).

+4
source share
2 answers

, . . setup_task_loggers .

logfile , sys.stderr.

, ? sys.stderr, .

:

  • superisord redirect_stderr = true , . .
  • .
+2

?

, . , .

celery.log

[2015-07-23 11:40:07,066: INFO/MainProcess] Received task: foo[b5a6e0e8-1027-4005-b2f6-1ea032c73d34]
[2015-07-23 11:40:07,494: INFO/MainProcess] Task foo[b5a6e0e8-1027-4005-b2f6-1ea032c73d34] succeeded in 0.424549156s: 1

celery_err.log /. .

0

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


All Articles