mirror of
https://github.com/sadoyan/aralez.git
synced 2026-10-23 06:01:35 +08:00
added inventory for immutable core logging files
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::logging::core::StructuredSystemLog;
|
||||
use crate::logging::types::WriteLog;
|
||||
use crate::logging::types::{LogBackendPlugin, WriteLog};
|
||||
use std::env;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
@@ -28,7 +28,15 @@ pub struct ElasticSearch;
|
||||
impl WriteLog for ElasticSearch {
|
||||
fn writelog(&self, msg: &StructuredSystemLog) {
|
||||
if let Ok(jsonmsg) = serde_json::to_string(&msg) {
|
||||
println!("Connecting to {} - {}:{} => {}", ELASTIC.hosts, ELASTIC.user, ELASTIC.password, jsonmsg);
|
||||
// ElasticSearch logic is not yet implemented.
|
||||
println!("{} - {}:{} => {}", ELASTIC.hosts, ELASTIC.user, ELASTIC.password, jsonmsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inventory::submit! {
|
||||
LogBackendPlugin {
|
||||
name: "elasticsearch",
|
||||
factory: || Box::new(ElasticSearch),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user