This commit is contained in:
Stéphane Bidoul
2020-06-18 19:39:26 +02:00
parent dd7c2b2ac8
commit 9bcdc7b8f8
+1
View File
@@ -28,6 +28,7 @@ class OdooJsonFormatter(jsonlogger.JsonFormatter):
record.pid = os.getpid()
record.dbname = getattr(threading.currentThread(), 'dbname', '?')
record.request_id = getattr(threading.current_thread(), 'request_uuid', None)
record.uid = getattr(threading.current_thread(), 'uid', None)
_super = super(OdooJsonFormatter, self)
return _super.add_fields(log_record, record, message_dict)