mirror of
https://github.com/thegeeklab/prometheus-pve-sd.git
synced 2024-06-14 13:40:51 +02:00
fix linting
This commit is contained in:
parent
eef587db15
commit
61ab9c4e77
|
@ -46,14 +46,14 @@ class LogFilter:
|
||||||
class SimpleFormatter(logging.Formatter):
|
class SimpleFormatter(logging.Formatter):
|
||||||
"""Logging Formatter for simple logs."""
|
"""Logging Formatter for simple logs."""
|
||||||
|
|
||||||
def format(self, record): # noqa
|
def format(self, record):
|
||||||
return logging.Formatter.format(self, record)
|
return logging.Formatter.format(self, record)
|
||||||
|
|
||||||
|
|
||||||
class MultilineFormatter(logging.Formatter):
|
class MultilineFormatter(logging.Formatter):
|
||||||
"""Logging Formatter to reset color after newline characters."""
|
"""Logging Formatter to reset color after newline characters."""
|
||||||
|
|
||||||
def format(self, record): # noqa
|
def format(self, record):
|
||||||
record.msg = record.msg.replace("\n", f"\n{colorama.Style.RESET_ALL}... ")
|
record.msg = record.msg.replace("\n", f"\n{colorama.Style.RESET_ALL}... ")
|
||||||
return logging.Formatter.format(self, record)
|
return logging.Formatter.format(self, record)
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ class MultilineFormatter(logging.Formatter):
|
||||||
class MultilineJsonFormatter(jsonlogger.JsonFormatter):
|
class MultilineJsonFormatter(jsonlogger.JsonFormatter):
|
||||||
"""Logging Formatter to remove newline characters."""
|
"""Logging Formatter to remove newline characters."""
|
||||||
|
|
||||||
def format(self, record): # noqa
|
def format(self, record):
|
||||||
record.msg = record.msg.replace("\n", " ")
|
record.msg = record.msg.replace("\n", " ")
|
||||||
return jsonlogger.JsonFormatter.format(self, record)
|
return jsonlogger.JsonFormatter.format(self, record)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user