From d74626ee1d8e0cfc169f53800408ef77486d4ae2 Mon Sep 17 00:00:00 2001
From: Guillermo Roche <groche97@gmail.com>
Date: Mon, 2 Dec 2024 22:07:33 +0100
Subject: [PATCH] fix env logger

---
 src/main.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main.rs b/src/main.rs
index d4a80df..508a8b3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -9,6 +9,10 @@ use std::fmt;
 #[tokio::main]
 async fn main() -> Result<(), Box<dyn std::error::Error>> {
     //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();
     match ElasticConection::new() {
         Ok(c) => start_loop(c, nut).await,