add selective log handle reload

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-07-11 00:42:49 +00:00
parent 0023b09f5b
commit 160f48043e
4 changed files with 21 additions and 8 deletions

View file

@ -27,7 +27,7 @@ pub(crate) fn init(config: &Config) -> (LogLevelReloadHandles, TracingFlameGuard
};
let (fmt_reload_filter, fmt_reload_handle) = reload::Layer::new(filter_layer.clone());
reload_handles.add("format", Box::new(fmt_reload_handle));
reload_handles.add("console", Box::new(fmt_reload_handle));
let subscriber = Registry::default().with(fmt_layer.with_filter(fmt_reload_filter));