mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 02:08:36 +00:00
[FIX] logging_json: deprecated method currentthread (#513)
Co-authored-by: augusto-weiss <awe@adhoc.com.ar>
This commit is contained in:
co-authored by
GitHub
augusto-weiss
parent
a10411107c
commit
95a2430568
@@ -32,7 +32,7 @@ def is_true(strval):
|
|||||||
class OdooJsonFormatter(jsonlogger.JsonFormatter):
|
class OdooJsonFormatter(jsonlogger.JsonFormatter):
|
||||||
def add_fields(self, log_record, record, message_dict):
|
def add_fields(self, log_record, record, message_dict):
|
||||||
record.pid = os.getpid()
|
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.request_id = getattr(threading.current_thread(), "request_uuid", None)
|
||||||
record.uid = getattr(threading.current_thread(), "uid", None)
|
record.uid = getattr(threading.current_thread(), "uid", None)
|
||||||
_super = super()
|
_super = super()
|
||||||
|
|||||||
Reference in New Issue
Block a user