mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 08:47:40 +00:00
logging_json: fix W0622(redefined-builtin)
This commit is contained in:
@@ -35,9 +35,10 @@ class OdooJsonFormatter(jsonlogger.JsonFormatter):
|
|||||||
|
|
||||||
|
|
||||||
if is_true(os.environ.get('ODOO_LOGGING_JSON')):
|
if is_true(os.environ.get('ODOO_LOGGING_JSON')):
|
||||||
format = ('%(asctime)s %(pid)s %(levelname)s'
|
formatted_message = (
|
||||||
'%(dbname)s %(name)s: %(message)s')
|
'%(asctime)s %(pid)s %(levelname)s %(dbname)s %(name)s: %(message)s'
|
||||||
formatter = OdooJsonFormatter(format)
|
)
|
||||||
|
formatter = OdooJsonFormatter(formatted_message)
|
||||||
logging.getLogger().handlers[0].formatter = formatter
|
logging.getLogger().handlers[0].formatter = formatter
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user