Use more efficient mask_dict_password to mask password
The mask_dict_password method is added from oslo_utils 3.4.0, and it's about five times faster than the mask_password method, so it's better to use mask_dict_password instead of mask_password. Change-Id: I6629ed1232f2e6f1c72b9f13b361e2f9e14b50a4
This commit is contained in:
parent
339a6236b3
commit
3288c4d7e2
@ -40,7 +40,7 @@ class LogDriver(notifier.Driver):
|
||||
message['event_type']))
|
||||
method = getattr(logger, priority.lower(), None)
|
||||
if method:
|
||||
method(strutils.mask_password(jsonutils.dumps(message)))
|
||||
method(jsonutils.dumps(strutils.mask_dict_password(message)))
|
||||
else:
|
||||
warnings.warn('Unable to log message as notify cannot find a '
|
||||
'logger with the priority specified '
|
||||
|
Loading…
Reference in New Issue
Block a user