mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Minor text changes to log message limitation
This commit is contained in:
parent
66a16b560f
commit
7e06912bca
5 changed files with 21 additions and 21 deletions
|
|
@ -241,7 +241,7 @@ class Content(object):
|
|||
else:
|
||||
logger.warning(("Unable to find {fn}, skipping url"
|
||||
" replacement".format(fn=value),
|
||||
"Other ressources were not found"
|
||||
"Other resources were not found"
|
||||
" and their urls not replaced"))
|
||||
elif what == 'category':
|
||||
origin = Category(path, self.settings).url
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class LimitFilter(logging.Filter):
|
|||
group_count = defaultdict(int)
|
||||
|
||||
def filter(self, record):
|
||||
# don't limit levels over warnings
|
||||
# don't limit log messages for anything above "warning"
|
||||
if record.levelno > logging.WARN:
|
||||
return record
|
||||
# extract group
|
||||
|
|
@ -105,7 +105,7 @@ class LimitFilter(logging.Filter):
|
|||
|
||||
class LimitLogger(logging.Logger):
|
||||
"""
|
||||
A logger which add LimitFilter automatically
|
||||
A logger which adds LimitFilter automatically
|
||||
"""
|
||||
|
||||
limit_filter = LimitFilter()
|
||||
|
|
|
|||
|
|
@ -171,15 +171,15 @@ def get_settings_from_file(path, default_settings=DEFAULT_CONFIG):
|
|||
|
||||
|
||||
def configure_settings(settings):
|
||||
"""Provide optimizations, error checking and warnings for the given
|
||||
"""Provide optimizations, error checking, and warnings for the given
|
||||
settings.
|
||||
Set up the logs to be ignored as well.
|
||||
Also, specify the log messages to be ignored.
|
||||
"""
|
||||
if not 'PATH' in settings or not os.path.isdir(settings['PATH']):
|
||||
raise Exception('You need to specify a path containing the content'
|
||||
' (see pelican --help for more information)')
|
||||
|
||||
# set up logs to be ignored
|
||||
# specify the log messages to be ignored
|
||||
LimitFilter.ignore.update(set(settings.get('LOG_FILTER',
|
||||
DEFAULT_CONFIG['LOG_FILTER'])))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue