MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / logging_handler

Function logging_handler

pre_commit/logging_handler.py:35–42  ·  view source on GitHub ↗
(use_color: bool)

Source from the content-addressed store, hash-verified

33
34@contextlib.contextmanager
35def logging_handler(use_color: bool) -> Generator[None]:
36 handler = LoggingHandler(use_color)
37 logger.addHandler(handler)
38 logger.setLevel(logging.INFO)
39 try:
40 yield
41 finally:
42 logger.removeHandler(handler)

Callers 2

mainFunction · 0.90
configure_loggingFunction · 0.90

Calls 1

LoggingHandlerClass · 0.85

Tested by 1

configure_loggingFunction · 0.72