feat: logging to log file
This commit is contained in:
@@ -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>,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user