This commit is contained in:
Stéphane Bidoul
2020-06-22 08:42:25 +02:00
parent c3b061e980
commit 384c75061a
+1
View File
@@ -27,6 +27,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)