Skip to content

Commit

Permalink
Core: logging: patches
Browse files Browse the repository at this point in the history
  • Loading branch information
LifeDJIK committed Aug 5, 2024
1 parent 325d401 commit c23c4ac
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pylon/core/tools/log_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def enable_basic_logging():
arbiter_log.initialized = True
#
log.init(level=basic_log_level, force=True)
apply_pylon_patches()


def reinit_logging(context):
Expand Down Expand Up @@ -70,6 +71,7 @@ def reinit_logging(context):
log_config["level"] = logging.DEBUG
#
log.init(config=log_config, force=True)
apply_pylon_patches()
return
#
# Construct config from debug mode, env vars, syslog and loki settings
Expand Down Expand Up @@ -107,3 +109,15 @@ def reinit_logging(context):
log_config["handlers"].append(loki_config)
#
log.init(config=log_config, force=True)
apply_pylon_patches()


def apply_pylon_patches():
""" Pylon-specific logging patches """
loggers_to_info = [
# Mute websocket debug messages
"geventwebsocket.handler",
]
#
for logger in loggers_to_info:
logging.getLogger(logger).setLevel(logging.INFO)

0 comments on commit c23c4ac

Please sign in to comment.