mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-25 23:02:05 +08:00
dragonpilot beta3
date: 2023-08-22T14:21:17 commit: 6148ce3d77530281f890970718e9c42b2acc5ff1
This commit is contained in:
@@ -65,7 +65,7 @@ class SwagFormatter(logging.Formatter):
|
||||
|
||||
return record_dict
|
||||
|
||||
def format(self, record):
|
||||
def format(self, record): # noqa: A003
|
||||
if self.swaglogger is None:
|
||||
raise Exception("must set swaglogger before calling format()")
|
||||
return json_robust_dumps(self.format_dict(record))
|
||||
@@ -95,7 +95,7 @@ class SwagLogFileFormatter(SwagFormatter):
|
||||
k += "$a"
|
||||
return k, v
|
||||
|
||||
def format(self, record):
|
||||
def format(self, record): # noqa: A003
|
||||
if isinstance(record, str):
|
||||
v = json.loads(record)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user