fix env logger

This commit is contained in:
Guillermo Roche 2024-12-02 22:07:33 +01:00
parent d4380260c1
commit d74626ee1d
Signed by: groche97
GPG Key ID: 041FB85BEEA4B9B0

View File

@ -9,6 +9,10 @@ use std::fmt;
#[tokio::main] #[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> { async fn main() -> Result<(), Box<dyn std::error::Error>> {
//println!("{}",chrono::offset::Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true)); //println!("{}",chrono::offset::Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true));
env_logger::Builder::from_default_env()
.format_timestamp_secs()
.filter(None, log::LevelFilter::Info)
.init();
let nut = NutClient::new().unwrap(); let nut = NutClient::new().unwrap();
match ElasticConection::new() { match ElasticConection::new() {
Ok(c) => start_loop(c, nut).await, Ok(c) => start_loop(c, nut).await,