From 24bef97d16cbf64ac997210b740c95935abd3ca7 Mon Sep 17 00:00:00 2001 From: Christian Michelsen Date: Sun, 27 Nov 2022 20:50:08 +0100 Subject: [PATCH] feat: Add logging to file --- src/metaDMG/loggers/log_config.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/metaDMG/loggers/log_config.yaml b/src/metaDMG/loggers/log_config.yaml index aeda02e..f22c2d1 100644 --- a/src/metaDMG/loggers/log_config.yaml +++ b/src/metaDMG/loggers/log_config.yaml @@ -17,20 +17,25 @@ handlers: class: rich.logging.RichHandler level: INFO formatter: brief - # stream: ext://sys.stdout show_time: true show_level: true show_path: false rich_tracebacks: true log_time_format: "%Y-%m-%d %H:%M:%S" + error_file_handler: + class: logging.FileHandler + level: DEBUG + formatter: simple + filename: logs/log.txt + encoding: utf8 + root: level: DEBUG - handlers: [console] + handlers: [console, error_file_handler] logger_tt: - # suppress: ["exchangelib", "numba", "matplotlib", "absl", "jax"] - suppress: ["jax"] + suppress: ["numba", "jax"] suppress_level_below: "WARNING" capture_print: False strict: False