MCPcopy Index your code
hub / github.com/huggingface/diffusers / _configure_library_root_logger

Function _configure_library_root_logger

src/diffusers/utils/logging.py:94–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92
93
94def _configure_library_root_logger() -> None:
95 global _default_handler
96
97 with _lock:
98 if _default_handler:
99 # This library has already configured the library root logger.
100 return
101 _default_handler = logging.StreamHandler() # Set sys.stderr as stream.
102
103 if sys.stderr: # only if sys.stderr exists, e.g. when not using pythonw in windows
104 _default_handler.flush = sys.stderr.flush
105
106 # Apply our default configuration to the library root logger.
107 library_root_logger = _get_library_root_logger()
108 library_root_logger.addHandler(_default_handler)
109 library_root_logger.setLevel(_get_default_logging_level())
110 library_root_logger.propagate = False
111 _ensure_rank_zero_filter(library_root_logger)
112
113
114def _reset_library_root_logger() -> None:

Callers 9

get_loggerFunction · 0.85
get_verbosityFunction · 0.85
set_verbosityFunction · 0.85
disable_default_handlerFunction · 0.85
enable_default_handlerFunction · 0.85
add_handlerFunction · 0.85
remove_handlerFunction · 0.85
disable_propagationFunction · 0.85
enable_propagationFunction · 0.85

Calls 3

_get_library_root_loggerFunction · 0.85
_ensure_rank_zero_filterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…