added ignoring noisy modules
This commit is contained in:
1 parent
6a2007937a
commit
1cb39e2e0d
2 files changed
+11
-2
No files matched your search
@@ -9,10 +9,9 @@ from monitor_utils.constants import (
|
||||
PROJECT_ROOT,
|
||||
PRODUCTION_BOT_TOKEN,
|
||||
DEVELOPMENT_BOT_TOKEN,
|
||||
LOGGERS,
|
||||
)
|
||||
|
||||
RESERVED = frozenset(logging.LogRecord("", 0, "", 0, "", (), None).__dict__)
|
||||
|
||||
|
||||
class DevelopmentMode(str, Enum):
|
||||
PRODUCTION = "PRODUCTION"
|
||||
@@ -63,3 +62,8 @@ def get_config(
|
||||
|
||||
with open(config_path) as f:
|
||||
return json.load(f), config_path
|
||||
|
||||
|
||||
def set_logger_levels(loggers: list[str] = LOGGERS, level: int = logging.WARNING):
|
||||
for name in loggers:
|
||||
logging.getLogger(name).setLevel(level)
|
||||
Reference in new issue
Block a user