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.
()
| 259 | |
| 260 | |
| 261 | def enable_explicit_format() -> None: |
| 262 | """ |
| 263 | Enable explicit formatting for every 🤗 Diffusers' logger. The explicit formatter is as follows: |
| 264 | ``` |
| 265 | [LEVELNAME|FILENAME|LINE NUMBER] TIME >> MESSAGE |
| 266 | ``` |
| 267 | All handlers currently bound to the root logger are affected by this method. |
| 268 | """ |
| 269 | handlers = _get_library_root_logger().handlers |
| 270 | |
| 271 | for handler in handlers: |
| 272 | formatter = logging.Formatter("[%(levelname)s|%(filename)s:%(lineno)s] %(asctime)s >> %(message)s") |
| 273 | handler.setFormatter(formatter) |
| 274 | |
| 275 | |
| 276 | def reset_format() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…