Only create log files for backup/restore/retention commands

Utility commands (schedule, snapshots, remotes, etc.) were creating
empty 0 B log files on every invocation. Now init_logging only runs
for commands that produce meaningful log output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shuki
2026-03-06 16:48:14 +02:00
parent 0b0204dada
commit 3e4b906f7e

View File

@@ -106,7 +106,10 @@ elif [[ -f "$CONFIG_DIR/gniza.conf" ]]; then
load_config
fi
init_logging
# Only create log files for operations that produce meaningful output
case "${SUBCOMMAND:-}" in
backup|restore|retention) init_logging ;;
esac
# ── Parse subcommand flags helper ────────────────────────────
_parse_flag() {