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)
|
||||
@@ -21,6 +21,11 @@ DEVELOPMENT_BOT_TOKEN = (
|
||||
)
|
||||
PROFIT_API_KEY = "dev-XvIu8S83BJ2N1C9ZCsoLAAav5jan7kj5"
|
||||
LOGGING_LEVEL = "INFO"
|
||||
LOGGERS = [
|
||||
"discord",
|
||||
"pymongo",
|
||||
"aiohttp",
|
||||
]
|
||||
|
||||
RETRY_LIMIT = 5
|
||||
RETRY_WAIT = 3
|
||||
|
||||
Reference in new issue
Block a user