MCPcopy Index your code
hub / github.com/apache/dubbo-python2 / format

Method format

dubbo/common/loggers.py:22–35  ·  view source on GitHub ↗
(self, record)

Source from the content-addressed store, hash-verified

20 return s
21
22 def format(self, record):
23 level_name = record.levelname
24 if level_name == 'ERROR':
25 color = 31
26 elif level_name == 'WARNING':
27 color = 33
28 elif level_name == 'INFO':
29 color = 32
30 else:
31 color = 34
32 while len(level_name) < 7:
33 level_name += ' '
34 record.levelname = '\033[{0}m{1}\033[0m'.format(color, level_name)
35 return logging.Formatter.format(self, record)
36
37
38def init_log():

Callers 15

__init__Method · 0.80
callMethod · 0.80
state_listenerMethod · 0.80
get_provider_hostMethod · 0.80
_watch_childrenMethod · 0.80
_watch_configuratorsMethod · 0.80
_register_consumerMethod · 0.80
_routing_with_wightMethod · 0.80
getMethod · 0.80
_get_connectionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected