Logging¶
Module for logging.
| author: | Mischa Kolbe <mik@dneg.com> |
|---|---|
| credits: | Steven Bills, Mischa Kolbe |
-
logger.clear_handlers()[source]¶ Reset handlers of logger.
Note
This prevents creating multiple handler copies when using reload(logger).
-
logger.setup_file_handler(file_path, max_bytes=104857600, level=20)[source]¶ Creates a rotating file handler for logging.
Default level is info.
Parameters: - file_path (str) – Path where to save the log to.
- max_bytes (int) – Maximum size of output file.
- level (int) – Desired logging level. Default is logging.INFO.
max_bytes: x << y Returns x with the bits shifted to the left by y places. 100 << 20 === 100 * 2 ** 20