format-multiline-log-fix
All checks were successful
Deploy to core / deploy (push) Successful in 1m8s
All checks were successful
Deploy to core / deploy (push) Successful in 1m8s
This commit is contained in:
parent
abc752c629
commit
66f1c654cf
|
@ -38,16 +38,13 @@ class MultilineColoredFormatter(colorlog.ColoredFormatter):
|
|||
formatted_lines = []
|
||||
for line in lines:
|
||||
# Format each line with the provided format
|
||||
formatted_lines.append(self._format_line(record, line))
|
||||
formatted_lines.append(super().format(record))
|
||||
# Join the formatted lines
|
||||
return '\n'.join(formatted_lines)
|
||||
else:
|
||||
# If not multiline or no message, use the default formatting
|
||||
return super().format(record)
|
||||
|
||||
def _format_line(self, record, line):
|
||||
# Format each line with the provided format
|
||||
return super().format(record, line)
|
||||
|
||||
|
||||
# Create a MultilineColoredFormatter object for colorized logging
|
||||
|
|
Loading…
Reference in New Issue
Block a user