Skip to content

Commit

Permalink
refactor: Moved logging init into main.rs (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
ActuallyHappening authored Feb 14, 2025
1 parent b7d9539 commit f9bfac8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod command;
pub mod compile;
pub mod config;
pub mod ext;
mod logger;
pub mod logger;
pub mod service;
pub mod signal;

Expand All @@ -21,9 +21,6 @@ use std::env;
use std::path::PathBuf;

pub async fn run(args: Cli) -> Result<()> {
let verbose = args.opts().map(|o| o.verbose).unwrap_or(0);
logger::setup(verbose, &args.log);

if let New(new) = &args.command {
return new.run().await;
}
Expand Down
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ async fn main() -> Result<()> {
}

let args = Cli::parse_from(&args);

let verbose = args.opts().map(|o| o.verbose).unwrap_or(0);
cargo_leptos::logger::setup(verbose, &args.log);

run(args).await
}

0 comments on commit f9bfac8

Please sign in to comment.