Enable explicit formatting for every 🤗 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.
()
| 237 | |
| 238 | |
| 239 | def enable_explicit_format() -> None: |
| 240 | """ |
| 241 | Enable explicit formatting for every 🤗 Diffusers' logger. The explicit formatter is as follows: |
| 242 | ``` |
| 243 | [LEVELNAME|FILENAME|LINE NUMBER] TIME >> MESSAGE |
| 244 | ``` |
| 245 | All handlers currently bound to the root logger are affected by this method. |
| 246 | """ |
| 247 | handlers = _get_library_root_logger().handlers |
| 248 | |
| 249 | for handler in handlers: |
| 250 | formatter = logging.Formatter("[%(levelname)s|%(filename)s:%(lineno)s] %(asctime)s >> %(message)s") |
| 251 | handler.setFormatter(formatter) |
| 252 | |
| 253 | |
| 254 | def reset_format() -> None: |
nothing calls this directly
no test coverage detected