Skip to content

Commit

Permalink
src: lib: Add missing command_line function and use it
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoantoniocardoso committed Oct 22, 2024
1 parent 3b25fa4 commit 3fae05a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 6 additions & 0 deletions src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ pub fn command_line_string() -> String {
std::env::args().collect::<Vec<String>>().join(" ")
}

// Return a clone of current Args struct
#[instrument(level = "debug")]
pub fn command_line() -> String {
format!("{:#?}", MANAGER.clap_matches)
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
5 changes: 1 addition & 4 deletions src/lib/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,5 @@ pub fn init() {
chrono::Local::now().format("%Y-%m-%dT%H:%M:%S"),
);
debug!("Command line call: {}", cli::command_line_string());
debug!(
"Command line input struct call: {}",
cli::command_line_string()
);
debug!("Command line input struct call: {}", cli::command_line());
}

0 comments on commit 3fae05a

Please sign in to comment.