mirror of
https://github.com/Djeeberjr/fw-anwesenheit.git
synced 2026-05-03 03:31:56 +00:00
added logger
LOG_LEVEL env var is now supported
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
use log::info;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
error::Error,
|
||||
fmt::Display,
|
||||
fs,
|
||||
};
|
||||
|
||||
#[derive(PartialEq, Eq, Deserialize, Serialize, Hash, Clone, PartialOrd, Ord)]
|
||||
pub struct TallyID(pub String);
|
||||
|
||||
impl Display for TallyID {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct AttendanceDay {
|
||||
date: String,
|
||||
@@ -106,6 +114,7 @@ impl AttendanceDay {
|
||||
if self.ids.contains(&id) {
|
||||
return;
|
||||
}
|
||||
info!("Adding id: {}", id);
|
||||
self.ids.push(id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user