Conditions | 1 |
Total Lines | 15 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 1 |
CRAP Score | 1.5786 |
Changes | 0 |
1 | """ |
||
17 | 1 | def configure_logging(level: str) -> None: |
|
18 | """Configure application-specific loggers. |
||
19 | |||
20 | Setting the log level does not affect dependencies' loggers. |
||
21 | """ |
||
22 | # Get the parent logger of all application-specific |
||
23 | # loggers defined in the package's modules. |
||
24 | pkg_logger = logging.getLogger(__package__) |
||
25 | |||
26 | # Configure handler that writes to STDERR. |
||
27 | handler = StreamHandler() |
||
28 | handler.setFormatter(Formatter('%(asctime)s %(levelname)-8s %(message)s')) |
||
29 | pkg_logger.addHandler(handler) |
||
30 | |||
31 | pkg_logger.setLevel(level) |
||
32 | |||
38 |