MCPcopy Create free account
hub / github.com/apache/dubbo-python2 / init_log

Function init_log

dubbo/common/loggers.py:38–49  ·  view source on GitHub ↗

初始化dubbo的日志配置 :return:

()

Source from the content-addressed store, hash-verified

36
37
38def init_log():
39 """
40 初始化dubbo的日志配置
41 :return:
42 """
43 logger = logging.getLogger('python-dubbo')
44 console_handler = logging.StreamHandler(sys.stdout)
45 formatter = MyFormatter(
46 '%(asctime)s %(levelname)s \033[35m%(process)-5d\033[0m --- [%(threadName)15s] \033[33m%(lineno)-4d\033[0m \033[36m%(filename)s\033[0m: %(message)s')
47 console_handler.formatter = formatter
48 logger.addHandler(console_handler)
49 logger.setLevel(logging.DEBUG)

Callers 2

setUpMethod · 0.90
setUpMethod · 0.90

Calls 1

MyFormatterClass · 0.85

Tested by 2

setUpMethod · 0.72
setUpMethod · 0.72