Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Moved logging init into main.rs #433

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}