mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Improve the looks of reST parser error output.
This commit is contained in:
parent
015eefe7de
commit
dd76c7158f
1 changed files with 3 additions and 0 deletions
|
|
@ -24,6 +24,9 @@ class BaseFormatter(logging.Formatter):
|
||||||
record.__dict__['customlevelname'] = customlevel
|
record.__dict__['customlevelname'] = customlevel
|
||||||
# format multiline messages 'nicely' to make it clear they are together
|
# format multiline messages 'nicely' to make it clear they are together
|
||||||
record.msg = record.msg.replace('\n', '\n | ')
|
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)
|
||||||
return super(BaseFormatter, self).format(record)
|
return super(BaseFormatter, self).format(record)
|
||||||
|
|
||||||
def formatException(self, ei):
|
def formatException(self, ei):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue