Task #2971
closedenable celery workers to log at levels below WARN
0%
Description
Celery workers set their own log level somehow. You can supply one via a celery setting, either on the command line or as an environment variable.
http://docs.celeryproject.org/en/v4.1.0/reference/celery.bin.worker.html#cmdoption-celery-worker-l
It defaults to WARN. I was able to get the workers to log at info by adding "--loglevel=INFO" to the worker unit file. That is probably not the best approach though. It is desirable to have a setting that can enable DEBUG logging across all of Pulp or not.
I think in Pulp 2 there was a mechanism for overriding whatever log level celery set, but I'm not entirely sure. This task is to figure out a reasonable approach for setting the log level across pulp and to make it happen.
Related issues
Updated by bizhang over 7 years ago
There is a celery setting to stop it from hijacking the root logger: http://docs.celeryproject.org/en/master/userguide/configuration.html#worker-hijack-root-logger
Updated by bizhang over 7 years ago
Another issue is that celery does no use the provided formatter when it hijacks logging.
Because of this I would recommend we stop celery from hijacking the root logger instead of re-configuring celery logging with the correct formatter in addition to the correct log level.
Updated by bizhang over 7 years ago
I looks that the worker_hijack_root_logger only stops celery from hijacking the handlers and not the loglevel. [0]
The way to stop if from hijacking everything is to use the celery setup_logging signal as per:
https://github.com/celery/celery/issues/2509#issuecomment-153936466
Updated by mhrivnak over 7 years ago
- Is duplicate of Issue #2906: Level INFO messages not being logged in worker processes. added
Updated by mhrivnak over 7 years ago
- Status changed from NEW to CLOSED - DUPLICATE
Updated by dalley almost 7 years ago
- Status changed from CLOSED - DUPLICATE to NEW
Updated by dalley over 6 years ago
- Status changed from NEW to CLOSED - WONTFIX
No longer applicable w/ switch away from Celery