feat(cli): add logs mode with tail/follow and completion support (#337)

Introduce a dedicated --logs mode for CLI log viewing with --tail <lines> and
-f/--follow streaming from the normal/debug log channel, keep user-facing CLI
output free of timestamped log formatting, and update bash/zsh completions for
the new logs flags.
This commit is contained in:
cucadmuh
2026-04-27 20:21:41 +03:00
committed by GitHub
parent 8967ca825d
commit bd2242e4f3
5 changed files with 242 additions and 62 deletions
+7
View File
@@ -85,6 +85,13 @@ fn main() {
if psysonic_lib::cli::wants_info(&args) {
psysonic_lib::cli::run_info_and_exit(&args);
}
if psysonic_lib::cli::wants_logs(&args) {
psysonic_lib::cli::run_tail_and_exit(&args);
}
if psysonic_lib::cli::wants_tail(&args) {
eprintln!("NOT OK: --tail is only valid with --logs");
std::process::exit(2);
}
psysonic_lib::run();
}