diff --git a/logging_json/json_log.py b/logging_json/json_log.py index cc7efcb4..91cf0bea 100644 --- a/logging_json/json_log.py +++ b/logging_json/json_log.py @@ -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)