From 5e0a4a02067bae050483e1515f77300fa644c84c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fern=C3=A1ndez?= Date: Mon, 20 Jan 2025 19:05:35 +0100 Subject: [PATCH 1/2] Added custom logging configuration with date and time --- src/init.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/init.rs b/src/init.rs index 0dd76e0..a044f88 100644 --- a/src/init.rs +++ b/src/init.rs @@ -7,8 +7,7 @@ use crate::utils; pub fn init() -> (AppConfig, Ruleset) { use std::path::Path; - use simplelog::WriteLogger; - use simplelog::Config; + use simplelog::{ WriteLogger, ConfigBuilder, format_description }; use std::fs; println!("[INFO] Achiefs File Integrity Monitoring software starting!"); @@ -21,10 +20,16 @@ pub fn init() -> (AppConfig, Ruleset) { ).parent().unwrap().to_str().unwrap() ).unwrap(); + // Modify the logger configuration + let log_config = ConfigBuilder::new() + .set_time_format_custom(format_description!( + "[year]-[month]-[day]T[hour]:[minute]:[second].[subsecond digits:4]")) + .build(); + // Create logger output to write generated logs. WriteLogger::init( cfg.clone().get_level_filter(), - Config::default(), + log_config, fs::OpenOptions::new() .create(true) .append(true) From a190378716dd698d93646292438792ad925d2315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fern=C3=A1ndez?= Date: Mon, 20 Jan 2025 19:16:09 +0100 Subject: [PATCH 2/2] Bump to 0.5.3 --- Cargo.toml | 2 +- pkg/deb/debian/changelog | 6 ++++++ pkg/rpm/fim.spec | 3 +++ src/appconfig.rs | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2c7a0f8..3f696b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fim" -version = "0.5.2" +version = "0.5.3" authors = ["José Fernández <´pylott@gmail.com´>"] edition = "2021" diff --git a/pkg/deb/debian/changelog b/pkg/deb/debian/changelog index 2f1d236..07cb449 100644 --- a/pkg/deb/debian/changelog +++ b/pkg/deb/debian/changelog @@ -1,3 +1,9 @@ +fim (0.5.3-1) xenial; urgency=medium + + * More info: https://github.com/Achiefs/fim/releases/tag/v0.5.3 + + -- Jose Fernandez Mon, 20 Jan 2025 19:14:00 +0000 + fim (0.5.2-1) xenial; urgency=medium * More info: https://github.com/Achiefs/fim/releases/tag/v0.5.2 diff --git a/pkg/rpm/fim.spec b/pkg/rpm/fim.spec index 84cdfad..1832649 100644 --- a/pkg/rpm/fim.spec +++ b/pkg/rpm/fim.spec @@ -101,6 +101,9 @@ rm -fr %{buildroot} # ----------------------------------------------------------------------------- %changelog +* Mon Jan 20 2025 support - 0.5.3 +- More info: https://github.com/Achiefs/fim/releases/tag/v0.5.3 + * Wed Jan 15 2025 support - 0.5.2 - More info: https://github.com/Achiefs/fim/releases/tag/v0.5.2 diff --git a/src/appconfig.rs b/src/appconfig.rs index 922a8a2..85587aa 100644 --- a/src/appconfig.rs +++ b/src/appconfig.rs @@ -1,7 +1,7 @@ // Copyright (C) 2021, Achiefs. // Global constants definitions -pub const VERSION: &str = "0.5.2"; +pub const VERSION: &str = "0.5.3"; pub const NETWORK_MODE: &str = "NETWORK"; pub const FILE_MODE: &str = "FILE"; pub const BOTH_MODE: &str = "BOTH";