mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-25 10:00:48 +01:00
Fixed weird formatting of colorized stdout stuff.
This commit is contained in:
parent
8a4e79e007
commit
b7bd3d414e
@ -137,11 +137,14 @@ class ColorizedFormatter(Formatter):
|
|||||||
color = ansi.RED
|
color = ansi.RED
|
||||||
elif record.levelno == logging.WARNING:
|
elif record.levelno == logging.WARNING:
|
||||||
color = ansi.YELLOW
|
color = ansi.YELLOW
|
||||||
|
if color:
|
||||||
return ''.join([color,
|
return ''.join([color,
|
||||||
Formatter.format(self, record, *args, **kwargs),
|
Formatter.format(self, record, *args, **kwargs),
|
||||||
ansi.RESET])
|
ansi.RESET])
|
||||||
else:
|
else:
|
||||||
return Formatter.format(self, record, *args, **kwargs)
|
return Formatter.format(self, record, *args, **kwargs)
|
||||||
|
else:
|
||||||
|
return Formatter.format(self, record, *args, **kwargs)
|
||||||
|
|
||||||
# These are public.
|
# These are public.
|
||||||
formatter = Formatter('%(levelname)s %(asctime)s %(message)s')
|
formatter = Formatter('%(levelname)s %(asctime)s %(message)s')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user