csv: Add initial implentation of Logging trait

This commit is contained in:
George Kaklamanos 2023-11-30 16:59:38 +02:00
parent 8573516f4f
commit cc958d3d93
No known key found for this signature in database
GPG key ID: C0CAB8A6BDC9399D
3 changed files with 10 additions and 0 deletions

View file

@ -7,3 +7,4 @@ license = "AGPL-3.0-or-later"
[dependencies]
csv = "1.1.6"
labadoor-acl = { path = "../labadoor-acl" }
labadoor-logging = { path = "../labadoor-logging" }

View file

@ -1,6 +1,7 @@
use serde::Deserialize;
pub mod acl;
pub mod logging;
pub struct CSVArgs {
pub path: String,

View file

@ -0,0 +1,8 @@
use crate::CSV;
use labadoor_logging::{LogEntry, Logging};
impl Logging for CSV {
fn append(&self, time: String, method: String, username: String, resource: String) {
println!("{},{},{},{}", time, method, username, resource);
}
}