-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect worker log level config setting #903
Conversation
✅ Deploy Preview for conda-store canceled.
|
✅ Deploy Preview for conda-store canceled.
|
# celery supports the log levels DEBUG | INFO | WARNING | ERROR | CRITICAL | FATAL | ||
# https://docs.celeryq.dev/en/main/reference/cli.html#celery-worker | ||
logging_to_celery_level_map = { | ||
50:"CRITICAL", 50:"FATAL", 40: "ERROR", 30: "WARNING", 20: "INFO", 10: "DEBUG" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't really a 1:1 relationship between the logging package error levels and the expected logging levels for celery. So, I think maintaining a map is required. Definitely open to suggestions if there is a better place to put this, like maybe a utils type file that I missed.
0f1343e
to
71c6410
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definitely looks correct, but given that Nebari may be impacted I'm going to wait for the okay from Nebari devs before merging this.
Confirmed after talking with @viniciusdc that this should be safe to do. Thanks! |
Description
This small PR updates the conda store worker to respect the
CondaStoreWorker.log_level
config parameter. Now users can see that the log level set for their works gets applied to the worker.Pull request checklist
How to test
Before this change, the worker was always running at
logger.INFO
log level. For example, you can see in the log outputTo test this add the following line to your conda-store config file
Restart the server and view the logs. Notice that the WARN and INFO log lines no longer appear in the logs.