MCPcopy Create free account
hub / github.com/VCIP-RGBD/DFormer / get_root_logger

Function get_root_logger

mmseg/utils/logger.py:7–28  ·  view source on GitHub ↗

Get the root logger. The logger will be initialized if it has not been initialized. By default a StreamHandler will be added. If `log_file` is specified, a FileHandler will also be added. The name of the root logger is the top-level package name, e.g., "mmseg". Args: lo

(log_file=None, log_level=logging.INFO)

Source from the content-addressed store, hash-verified

5
6
7def get_root_logger(log_file=None, log_level=logging.INFO):
8 """Get the root logger.
9
10 The logger will be initialized if it has not been initialized. By default a
11 StreamHandler will be added. If `log_file` is specified, a FileHandler will
12 also be added. The name of the root logger is the top-level package name,
13 e.g., "mmseg".
14
15 Args:
16 log_file (str | None): The log filename. If specified, a FileHandler
17 will be added to the root logger.
18 log_level (int): The root logger level. Note that only the process of
19 rank 0 is affected, while other processes will set the level to
20 "Error" and be silent most of the time.
21
22 Returns:
23 logging.Logger: The root logger.
24 """
25
26 logger = get_logger(name="mmseg", log_file=log_file, log_level=log_level)
27
28 return logger

Callers 9

add_paramsMethod · 0.90
train_segmentorFunction · 0.90
init_weightsMethod · 0.90
init_weightsMethod · 0.90
init_weightsMethod · 0.90
init_weightsMethod · 0.90
setup_multi_processesFunction · 0.85
init_weightsMethod · 0.85
init_weightsMethod · 0.85

Calls 1

get_loggerFunction · 0.90

Tested by

no test coverage detected