mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
fix log formatting of iterable objects
This commit is contained in:
parent
f61bd2ceba
commit
dd94655f4d
1 changed files with 4 additions and 3 deletions
|
|
@ -28,9 +28,10 @@ class BaseFormatter(logging.Formatter):
|
|||
record.__dict__['customlevelname'] = customlevel
|
||||
# format multiline messages 'nicely' to make it clear they are together
|
||||
record.msg = record.msg.replace('\n', '\n | ')
|
||||
record.args = tuple(arg.replace('\n', '\n | ') if
|
||||
isinstance(arg, six.string_types) else
|
||||
arg for arg in record.args)
|
||||
if isinstance(args, tuple):
|
||||
record.args = tuple(arg.replace('\n', '\n | ') if
|
||||
isinstance(arg, six.string_types) else
|
||||
arg for arg in record.args)
|
||||
return super(BaseFormatter, self).format(record)
|
||||
|
||||
def formatException(self, ei):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue