From 090a9f2b9655d4ea425722165e2754ba100729c9 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 9 Jul 2023 00:16:46 -0700 Subject: [PATCH] Update ddrescue-tui logging handling --- scripts/wk/clone/ddrescue.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/wk/clone/ddrescue.py b/scripts/wk/clone/ddrescue.py index c3537d19..69c66cb0 100644 --- a/scripts/wk/clone/ddrescue.py +++ b/scripts/wk/clone/ddrescue.py @@ -1758,7 +1758,18 @@ def source_or_destination_changed(state) -> bool: def main() -> None: """Main function for ddrescue TUI.""" args = docopt(DOCSTRING) - log.update_log_path(dest_name='ddrescue-TUI', timestamp=True) + log_dir = log.format_log_path() + log_dir = pathlib.Path( + f'{log_dir.parent}/' + f'ddrescue-TUI_{time.strftime("%Y-%m-%d_%H%M%S%z")}/' + ) + log.update_log_path( + dest_dir=log_dir, + dest_name='main', + keep_history=False, + timestamp=False, + ) + LOG.info('ddrescue-tui Start') # Check if running inside tmux if 'TMUX' not in os.environ: