Skip to content
Myr

Extend the logging from the dynamically set logger class. This fixes #234

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 9c00f8b · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:flask/logging.py+2 added-1 removed
9 unmodified lines
10"""1112from __future__ import absolute_import1314from logging import getLogger, StreamHandler, Formatter, Logger, DEBUG14from logging import getLogger, StreamHandler, Formatter, getLoggerClass, DEBUG151617def create_logger(app):18 """Creates a logger for the given application. This logger works
1 unmodified line
20 level based on the application's debug flag. Furthermore this21 function also removes all attached handlers in case there was a22 logger with the log name before.23 """24 Logger = getLoggerClass()2526 class DebugLogger(Logger):27 def getEffectiveLevel(x):28 return DEBUG if app.debug else Logger.getEffectiveLevel(x)
15 unmodified lines