MCPcopy Create free account
hub / github.com/ceph/ceph / CPlusPlusHandler

Class CPlusPlusHandler

src/pybind/mgr/mgr_module.py:688–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

686
687
688class CPlusPlusHandler(logging.Handler):
689 def __init__(self, module_inst: Any):
690 super(CPlusPlusHandler, self).__init__()
691 self._module = module_inst
692 self.setFormatter(logging.Formatter("[{} %(levelname)-4s %(name)s] %(message)s"
693 .format(module_inst.module_name)))
694
695 def emit(self, record: logging.LogRecord) -> None:
696 if record.levelno >= self.level:
697 self._module._ceph_log(self.format(record))
698
699
700class MgrRootHandler(CPlusPlusHandler):

Callers 1

_configure_loggingMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected