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

Method _ceph_log_level_to_python

src/pybind/mgr/mgr_module.py:853–869  ·  view source on GitHub ↗
(self, log_level: str)

Source from the content-addressed store, hash-verified

851 self._module_logger.removeHandler(self._cluster_log_handler)
852
853 def _ceph_log_level_to_python(self, log_level: str) -> str:
854 if log_level:
855 try:
856 ceph_log_level = int(log_level.split("/", 1)[0])
857 except ValueError:
858 ceph_log_level = 0
859 else:
860 ceph_log_level = 0
861
862 log_level = "DEBUG"
863 if ceph_log_level <= 0:
864 log_level = "CRITICAL"
865 elif ceph_log_level <= 1:
866 log_level = "WARNING"
867 elif ceph_log_level <= 4:
868 log_level = "INFO"
869 return log_level
870
871 def getLogger(self, name: Optional[str] = None) -> logging.Logger:
872 logger = getattr(self, '_module_logger', None) \

Callers 1

_set_log_levelMethod · 0.95

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected