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

1"""Custom logging for notion-sdk-py.""" 

2 

3import logging 

4from logging import Logger 

5 

6 

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