MCPcopy Create free account
hub / github.com/AlayaLab/Hive / enable_explicit_format

Function enable_explicit_format

models/flowsep/diffusers/utils/logging.py:242–254  ·  view source on GitHub ↗

Enable explicit formatting for every HuggingFace Diffusers' logger. The explicit formatter is as follows: ``` [LEVELNAME|FILENAME|LINE NUMBER] TIME >> MESSAGE ``` All handlers currently bound to the root logger are affected by this method.

()

Source from the content-addressed store, hash-verified

240
241
242def enable_explicit_format() -> None:
243 """
244 Enable explicit formatting for every HuggingFace Diffusers' logger. The explicit formatter is as follows:
245 ```
246 [LEVELNAME|FILENAME|LINE NUMBER] TIME >> MESSAGE
247 ```
248 All handlers currently bound to the root logger are affected by this method.
249 """
250 handlers = _get_library_root_logger().handlers
251
252 for handler in handlers:
253 formatter = logging.Formatter("[%(levelname)s|%(filename)s:%(lineno)s] %(asctime)s >> %(message)s")
254 handler.setFormatter(formatter)
255
256
257def reset_format() -> None:

Callers

nothing calls this directly

Calls 1

_get_library_root_loggerFunction · 0.85

Tested by

no test coverage detected