(cls: Type[_IT])
| 69 | |
| 70 | |
| 71 | def class_logger(cls: Type[_IT]) -> Type[_IT]: |
| 72 | logger = logging.getLogger(_qual_logger_name_for_cls(cls)) |
| 73 | cls._should_log_debug = lambda self: logger.isEnabledFor( # type: ignore[method-assign] # noqa: E501 |
| 74 | logging.DEBUG |
| 75 | ) |
| 76 | cls._should_log_info = lambda self: logger.isEnabledFor( # type: ignore[method-assign] # noqa: E501 |
| 77 | logging.INFO |
| 78 | ) |
| 79 | cls.logger = logger |
| 80 | _logged_classes.add(cls) |
| 81 | return cls |
| 82 | |
| 83 | |
| 84 | _IdentifiedLoggerType = Union[logging.Logger, "InstanceLogger"] |
nothing calls this directly
no test coverage detected