Skip to content
Myr

Changed logic for debug level log settings

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 583c5f7 · Browse files · 3 files+12 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

3 files+12 added−1 removed

  • other:+12 added−1 removed

3 files+12 added−1 removed

modified:flask/testsuite/helpers.py+7 added
244 unmodified lines
245 pass246 else:247 self.assert_(False, 'debug log ate the exception')248249 def test_debug_log_override(self):250 app = flask.Flask(__name__)251 app.debug = True252 app.logger_name = 'flask_tests/test_debug_log_override'253 app.logger.level = 10254 self.assert_equal(app.logger.level, 10)255256 def test_exception_logging(self):257 out = StringIO()258 app = flask.Flask(__name__)259 app.logger_name = 'flask_tests/test_exception_logging'
55 unmodified lines
modified:flask/logging.py+3 added-1 removed
23 unmodified lines
24 Logger = getLoggerClass()2526 class DebugLogger(Logger):27 def getEffectiveLevel(x):28 if x.level == 0 and app.debug:29 return DEBUG28 return DEBUG if app.debug else Logger.getEffectiveLevel(x)30 return Logger.getEffectiveLevel(x)3132 class DebugHandler(StreamHandler):33 def emit(x, record):34 StreamHandler.emit(x, record) if app.debug else None
11 unmodified lines
modified:CHANGES+2 added
8 unmodified lines
9Relase date to be decided, codename to be chosen.1011- The :func:`flask.url_for` function now can generate anchors to the12 generated links.13- Logger now only returns the debug log setting if it was not set14 explicitly.1516Version 0.8.117-------------18
294 unmodified lines