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
On a Django project using django_extensions, using python manage.py runserver_plus with the latest werkzeug (v0.15.1) results in double-printing all logging statements. This is not an issue in v0.14.1; the issue arose in commit 4cf77d2. The reason for this issue is that runserver_plus modifies the werkzeug logger by setting its log level and adding a handler. Older versions of werkzeug only added a log handler if there was no log level and no handler on the root logger. Since that commit, werkzeug adds a log handler if there is no handler on the root logger, regardless of log level. This results in there being two handlers, and thus all logging statements get printed twice. If werkzeug checks for a handler on the werkzeug logger instead of the root logger, the second handler won't get added. Is there a reason to check the root logger for handlers, seeing as werkzeug doesn't use the root logger?
The text was updated successfully, but these errors were encountered:
On a Django project using
django_extensions
, usingpython manage.py runserver_plus
with the latestwerkzeug
(v0.15.1
) results in double-printing all logging statements. This is not an issue inv0.14.1
; the issue arose in commit 4cf77d2. The reason for this issue is thatrunserver_plus
modifies thewerkzeug
logger by setting its log level and adding a handler. Older versions ofwerkzeug
only added a log handler if there was no log level and no handler on the root logger. Since that commit,werkzeug
adds a log handler if there is no handler on the root logger, regardless of log level. This results in there being two handlers, and thus all logging statements get printed twice. Ifwerkzeug
checks for a handler on thewerkzeug
logger instead of the root logger, the second handler won't get added. Is there a reason to check the root logger for handlers, seeing aswerkzeug
doesn't use the root logger?The text was updated successfully, but these errors were encountered: