Merge pull request #486 from adhoc-dev/18.0-current-thread

[FIX] logging_json: deprecated method currentthread
This commit is contained in:
Florent Xicluna authored and GitHub committed 2025-05-06 10:46:46 +02:00
commit b929f7bbc5
1 file changed
+1 -1
+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()
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.