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

Method __init__

src/pybind/mgr/mgr_module.py:734–742  ·  view source on GitHub ↗
(self, module_inst: Any)

Source from the content-addressed store, hash-verified

732
733class FileHandler(logging.FileHandler):
734 def __init__(self, module_inst: Any):
735 path = module_inst.get_ceph_option("log_file")
736 idx = path.rfind(".log")
737 if idx != -1:
738 self.path = "{}.{}.log".format(path[:idx], module_inst.module_name)
739 else:
740 self.path = "{}.{}".format(path, module_inst.module_name)
741 super(FileHandler, self).__init__(self.path, delay=True)
742 self.setFormatter(logging.Formatter("%(asctime)s [%(threadName)s] [%(levelname)-4s] [%(name)s] %(message)s"))
743
744
745class MgrModuleLoggingMixin(object):

Callers

nothing calls this directly

Calls 5

rfindMethod · 0.80
FormatterMethod · 0.80
get_ceph_optionMethod · 0.45
formatMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected