Skip to content

Commit

Permalink
Merge pull request #219 from sberdevices/feature/skip_render_log_if_n…
Browse files Browse the repository at this point in the history
…ot_enabled

skip rendering log params if level less than logger level
  • Loading branch information
christinadomanskaya authored Mar 22, 2022
2 parents a1d6abd + e43fb84 commit 8149f28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/logging/logger_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def log(message, user=None, params=None, level="INFO", exc_info=None, log_store_
previous_frame = current_frame.f_back
module_name = previous_frame.f_globals["__name__"]
logger = logging.getLogger(module_name)
if not logger.isEnabledFor(level_name):
return
instance = previous_frame.f_locals.get('self', None)

from smart_kit.configs import get_app_config
Expand Down

0 comments on commit 8149f28

Please sign in to comment.