MCPcopy Create free account
hub / github.com/hankcs/HanLP / formatMessage

Method formatMessage

hanlp/utils/log_util.py:21–26  ·  view source on GitHub ↗
(self, record: LogRecord)

Source from the content-addressed store, hash-verified

19 self.enable = enable
20
21 def formatMessage(self, record: LogRecord) -> str:
22 message = super().formatMessage(record)
23 if self.enable:
24 return color_format(message)
25 else:
26 return remove_color_tag(message)
27
28
29def init_logger(name=None, root_dir=None, level=logging.INFO, mode='w',

Callers

nothing calls this directly

Calls 2

color_formatFunction · 0.85
remove_color_tagFunction · 0.85

Tested by

no test coverage detected