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