forked from github/pelican
Don't suppress LOG_FILTER messages when --debug passed
This commit is contained in:
parent
1b1d1fd9f7
commit
30b8955134
2 changed files with 8 additions and 6 deletions
|
|
@ -787,6 +787,8 @@ possible to unintentionally filter out multiple message types with the same
|
||||||
template (including messages from future Pelican versions). Proceed with
|
template (including messages from future Pelican versions). Proceed with
|
||||||
caution.
|
caution.
|
||||||
|
|
||||||
|
Note: This option does nothing ``--debug`` is passed.
|
||||||
|
|
||||||
.. _reading_only_modified_content:
|
.. _reading_only_modified_content:
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,12 +112,12 @@ class LimitFilter(logging.Filter):
|
||||||
else:
|
else:
|
||||||
self._raised_messages.add(message_key)
|
self._raised_messages.add(message_key)
|
||||||
|
|
||||||
# ignore LOG_FILTER records
|
# ignore LOG_FILTER records by templates when "debug" isn't enabled
|
||||||
# use .msg and not .getMessage() for string formatting to allow
|
logger_level = logging.getLogger().getEffectiveLevel()
|
||||||
# filtering by templates
|
if logger_level > logging.DEBUG:
|
||||||
ignore_key = (record.levelno, record.msg)
|
ignore_key = (record.levelno, record.msg)
|
||||||
if ignore_key in self._ignore:
|
if ignore_key in self._ignore:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# check if we went over threshold
|
# check if we went over threshold
|
||||||
if group:
|
if group:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue