Coverage for notion_client/logging.py: 100%
9 statements
« prev ^ index » next coverage.py v7.6.0, created at 2024-07-13 22:22 +0000
« prev ^ index » next coverage.py v7.6.0, created at 2024-07-13 22:22 +0000
1"""Custom logging for notion-sdk-py."""
3import logging
4from logging import Logger
7def make_console_logger() -> Logger:
8 """Return a custom logger."""
9 logger = logging.getLogger(__package__)
10 handler = logging.StreamHandler()
11 formatter = logging.Formatter(logging.BASIC_FORMAT)
12 handler.setFormatter(formatter)
13 logger.addHandler(handler)
14 return logger