Logging performance improvment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Expired
|
Undecided
|
Unassigned |
Bug Description
We have the log decorator that is used in diffrent modules: https:/
We can add a check and see if the log is going to be written before we call it.
def log(method):
"""Decorator helping to log method calls."""
def wrapper(*args, **kwargs):
if LOG.isEnabledFo
data = {"class_name": (instance.
return method(*args, **kwargs)
return wrapper
See: https:/
Changed in neutron: | |
assignee: | nobody → Avishay Balderman (avishayb) |
tags: | added: low-hanging-fruit |
Changed in neutron: | |
assignee: | Avishay Balderman (avishayb) → nobody |
Changed in neutron: | |
assignee: | nobody → PSargent (petra-sargent) |
Changed in neutron: | |
assignee: | PSargent (petra-sargent) → nobody |
I have feeling that log library already capable of doing such check.
That's particularly is the reason to pass string substitution parameters as parameters to a logging functions instead of constructing log message in place.