aboutsummaryrefslogtreecommitdiff
path: root/labbot/logger.py
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2022-05-04 15:31:11 +0200
committerJan200101 <sentrycraft123@gmail.com>2022-05-04 15:31:11 +0200
commitfadd1eab07c9dfe317dfc31efa8ea254a78c3eeb (patch)
tree96f816efd151fd2b132add45a000bf0a7259e613 /labbot/logger.py
parent1ec64ccb178a4164ac204925c20c559d96508a9b (diff)
downloadlab-bot-fadd1eab07c9dfe317dfc31efa8ea254a78c3eeb.tar.gz
lab-bot-fadd1eab07c9dfe317dfc31efa8ea254a78c3eeb.zip
improve typing, disable non-critical logging for aiohttp, […]
- correctly popped values from kwargs to pass over to gidgetlab - add merge hook registration method to simplify future additions - add new setups values to config - add print option to config
Diffstat (limited to 'labbot/logger.py')
-rw-r--r--labbot/logger.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/labbot/logger.py b/labbot/logger.py
index 067bcac..ebe26c3 100644
--- a/labbot/logger.py
+++ b/labbot/logger.py
@@ -1,10 +1,13 @@
import sys
import logging
-def init(level: int):
+def init(level: int) -> None:
logger = logging.getLogger()
logger.setLevel(level)
+ aiohttp_logger = logging.getLogger("aiohttp")
+ aiohttp_logger.setLevel(logging.WARNING)
+
formatter = logging.Formatter(
"[{asctime}] [{levelname}] {name}: {message}", datefmt="%Y-%m-%d %H:%M:%S", style="{"
)