[FIX] core: lower_logging record.args not str
As per the logging documentation, it is fine to send arguments that are not string. Logging takes care of stringifying and injecting the arguments in the message template. closes odoo/odoo#78172 Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
This commit is contained in:
+1
-1
@@ -836,7 +836,7 @@ class lower_logging(logging.Handler):
|
||||
record.levelname = f'_{record.levelname}'
|
||||
record.levelno = self.max_level
|
||||
self.had_error_log = True
|
||||
record.args = tuple(arg.replace('Traceback (most recent call last):', '_Traceback_ (most recent call last):') for arg in record.args)
|
||||
record.args = tuple(arg.replace('Traceback (most recent call last):', '_Traceback_ (most recent call last):') if type(arg) is str else arg for arg in record.args) # pylint: disable=unidiomatic-typecheck
|
||||
|
||||
for handler in self.old_handlers:
|
||||
if handler.level <= record.levelno:
|
||||
|
||||
Reference in New Issue
Block a user