main log logic rework

feature/1184
prplV 2025-04-08 04:44:41 -04:00
parent 9055142073
commit 5842c93ecf
1 changed files with 10 additions and 11 deletions

View File

@ -33,16 +33,15 @@ async fn main() -> anyhow::Result<()> {
.unwrap_or_else(|_| "INFO".to_owned()); .unwrap_or_else(|_| "INFO".to_owned());
tracing_subscriber::fmt() tracing_subscriber::fmt()
.with_max_level(tracing::Level::from_str(&log_level).unwrap_or_else(|_| tracing::Level::INFO)) .with_max_level(tracing::Level::from_str(&log_level).unwrap_or_else(|_| tracing::Level::INFO))
.with_writer(std::io::stdout) .with_writer(std::io::stdout)
.with_span_events(tracing_subscriber::fmt::format::FmtSpan::NEW) .with_span_events(tracing_subscriber::fmt::format::FmtSpan::NEW)
.with_line_number(false) .with_line_number(false)
.with_target(false) .with_target(false)
.with_file(false) .with_file(false)
.compact() .compact()
.init(); .init();
info!("Logger was created and configurated, dotenv vars were loaded (if exist)");
info!("Loading env vars from .env if exists ...");
info!("Initializing local Prometehus metrics registry ..."); info!("Initializing local Prometehus metrics registry ...");
let registry = Registry::new(); let registry = Registry::new();