From 721cc4d3d04b7995d91eca76bded2f2425c88436 Mon Sep 17 00:00:00 2001 From: Nick Mello Date: Sat, 7 Feb 2026 20:54:27 -0600 Subject: [PATCH] Add name argument Gives more options to the user to customize logs Signed-off-by: Nicholas Mello --- src/main.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f768f14..291376d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,6 +25,9 @@ impl From for Level { #[derive(Parser)] struct Args { + #[arg(short, long)] + name: Option, + #[arg(short, long, default_value = "info")] log_level: LogLevel, @@ -34,8 +37,13 @@ struct Args { fn main() { let args = Args::parse(); + let name = match args.name { + Some(name) => name, + None => "command-line".into(), + }; + // Initialize the logging system - init_logging("command-line"); + init_logging(name.as_str()); log!(args.log_level.into(), "{}", args.print_string); }