mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 20:01:33 +00:00
Fix logging bug
This commit is contained in:
parent
5f5fc1a8c9
commit
c5c5d2c10a
@ -109,10 +109,10 @@ class TFWLogFormatter(Formatter):
|
|||||||
def trim(self, value):
|
def trim(self, value):
|
||||||
if isinstance(value, dict):
|
if isinstance(value, dict):
|
||||||
return {k: self.trim(v) for k, v in value.items()}
|
return {k: self.trim(v) for k, v in value.items()}
|
||||||
if isinstance(value, (int, float)):
|
if isinstance(value, str):
|
||||||
return value
|
|
||||||
value_str = str(value)
|
value_str = str(value)
|
||||||
return value_str if len(value_str) <= self.limit else f'{value_str[:self.limit]}...'
|
return value_str if len(value_str) <= self.limit else f'{value_str[:self.limit]}...'
|
||||||
|
return value
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def fetch_exception_origin(trace):
|
def fetch_exception_origin(trace):
|
||||||
|
Loading…
Reference in New Issue
Block a user