Task #2971
enable 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
History
#1
Updated by bizhang over 3 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
#2
Updated by bizhang over 3 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.
#3
Updated by bizhang over 3 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
#4
Updated by mhrivnak over 3 years ago
- Is duplicate of Issue #2906: Level INFO messages not being logged in worker processes. added
#5
Updated by mhrivnak over 3 years ago
- Status changed from NEW to CLOSED - DUPLICATE
#6
Updated by dalley almost 3 years ago
- Status changed from CLOSED - DUPLICATE to NEW
#7
Updated by dalley over 2 years ago
- Status changed from NEW to CLOSED - WONTFIX
No longer applicable w/ switch away from Celery
#8
Updated by daviddavis almost 2 years ago
- Sprint/Milestone set to 3.0.0
#9
Updated by bmbouter over 1 year ago
- Tags deleted (
Pulp 3)
Please register to edit this issue