feat: logging to log file

This commit is contained in:
Michel de Graaf
2025-11-18 15:49:53 +01:00
parent 4c6d7c6850
commit 2ba48663e4
3 changed files with 115 additions and 4 deletions
+4
View File
@@ -1,4 +1,5 @@
use clap::{Parser, Subcommand};
use std::path::PathBuf;
#[derive(Parser, Debug)]
#[command(
@@ -32,6 +33,9 @@ pub struct Cli {
#[arg(short, long, global = true, action = clap::ArgAction::Count)]
pub verbose: u8,
#[arg(long, env = "LOG_FILE", help = "Write logs to file instead of stderr")]
pub log_file: Option<PathBuf>,
#[command(subcommand)]
pub command: Option<Commands>,