Merge pull request #453 from sebalix/16-logging_json-fix-maximum_recursion_depth_exceeded

[16.0][FIX] logging_json: fix RecursionError
This commit is contained in:
cyril jeanneret
2024-03-27 13:24:08 +01:00
committed by GitHub
co-authored by GitHub
+1 -1
View File
@@ -26,7 +26,7 @@ def is_true(strval):
class OdooJsonFormatter(jsonlogger.JsonFormatter):
def add_fields(self, log_record, record, message_dict):
record.pid = os.getpid()
record.dbname = getattr(threading.currentThread(), "dbname", "?")
record.dbname = getattr(threading.current_thread(), "dbname", "?")
record.request_id = getattr(threading.current_thread(), "request_uuid", None)
record.uid = getattr(threading.current_thread(), "uid", None)
_super = super(OdooJsonFormatter, self)