4

When starting Celery Worker it outputs one warn message:
[2016-06-26 20:30:23,005: WARNING/MainProcess] celery@daniula.local ready

When setting up Raven client to collect errors and warning to Sentry:

from raven.contrib.celery import register_signal, register_logger_signal
import logging 

sentry = Client(config.get('SENTRY_DSN'))
register_logger_signal(sentry, loglevel=logging.WARN)

This irrelevant warning is reported to Sentry on every workers restart.

Is there any way to disable it or switch to log.info?

daniula
  • 6,898
  • 4
  • 32
  • 49
  • Did you find a solution to this? I'm running into same thing, and want to be able to use warn log level into my tasks as well. – Andrei-Niculae Petre Sep 15 '16 at 06:52
  • Sorry, I gave up on this. – daniula Sep 15 '16 at 14:29
  • I think I will too and use only `ERROR` level in my tasks. Seems there are a few more messages like [this one "Restoring %d unacknowledged message(s)"](https://github.com/celery/kombu/blob/84fc45b9a76026c054ab1d31ec3883dd2e56c440/kombu/transport/virtual/base.py#L48) that are printed as a warning as well. Might be even more, idk. So definitely it wouldn't be only one thing to change. – Andrei-Niculae Petre Sep 16 '16 at 07:46

1 Answers1

3

There is an ongoing issue opened with Celery on this.

You can however add this options to the config and move ANY stdout/stderr to info level in the logger:

    'CELERY_REDIRECT_STDOUTS_LEVEL': 'INFO',
Alexandru Chirila
  • 2,274
  • 5
  • 29
  • 40
  • 1
    It seems that the issue has now been closed and this shouldn't be a problem anymore thanks to this change: https://github.com/celery/celery/commit/c8726b8a48a5c1b07f254cdd2023c00033bdcb6d – Douglas Anderson Feb 08 '17 at 21:47