Update ddrescue-tui logging handling
This commit is contained in:
parent
4467369811
commit
090a9f2b96
1 changed files with 12 additions and 1 deletions
|
|
@ -1758,7 +1758,18 @@ def source_or_destination_changed(state) -> bool:
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
"""Main function for ddrescue TUI."""
|
"""Main function for ddrescue TUI."""
|
||||||
args = docopt(DOCSTRING)
|
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
|
# Check if running inside tmux
|
||||||
if 'TMUX' not in os.environ:
|
if 'TMUX' not in os.environ:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue