add systemd unit logging mode

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-02-06 03:14:37 +00:00
parent fda8b36809
commit 62d80b97e6
4 changed files with 78 additions and 12 deletions

View file

@ -3,7 +3,7 @@ use std::sync::Arc;
use conduwuit::{
config::Config,
debug_warn, err,
log::{capture, fmt_span, ConsoleFormat, LogLevelReloadHandles},
log::{capture, fmt_span, ConsoleFormat, ConsoleWriter, LogLevelReloadHandles},
result::UnwrapOrErr,
Result,
};
@ -30,7 +30,7 @@ pub(crate) fn init(
.with_span_events(console_span_events)
.event_format(ConsoleFormat::new(config))
.fmt_fields(ConsoleFormat::new(config))
.map_writer(|w| w);
.with_writer(ConsoleWriter::new(config));
let (console_reload_filter, console_reload_handle) =
reload::Layer::new(console_filter.clone());