You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 27, 2021. It is now read-only.
You do your logging setup via logging.basicConfig(). As per the python docs:
"This function does nothing if the root logger already has handlers configured for it."
So if I have logging configured for django via settings.LOGGING, I can't use the process_tasks logging options to override that.
And confusingly, --log-file silently has no effect.
This is really problematic when running under cron if settings.LOGGING includes a stream handler, as you need to silence everything but errors on stdout/stderr to avoid having cron email you non-error output all the time.
Since process_tasks runs in its own process, maybe we should instead remove all handlers and add a file handler if and only if --log-file is provided?
The text was updated successfully, but these errors were encountered:
You do your logging setup via logging.basicConfig(). As per the python docs:
"This function does nothing if the root logger already has handlers configured for it."
So if I have logging configured for django via settings.LOGGING, I can't use the process_tasks logging options to override that.
And confusingly, --log-file silently has no effect.
This is really problematic when running under cron if settings.LOGGING includes a stream handler, as you need to silence everything but errors on stdout/stderr to avoid having cron email you non-error output all the time.
Since process_tasks runs in its own process, maybe we should instead remove all handlers and add a file handler if and only if --log-file is provided?
The text was updated successfully, but these errors were encountered: