From daf2b0da3d49c513db41b513823d72593fca4b53 Mon Sep 17 00:00:00 2001 From: tonitrnel Date: Sun, 23 Feb 2025 11:38:55 +0800 Subject: [PATCH] feat: expose dispatch chain method --- plugins/log/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/log/src/lib.rs b/plugins/log/src/lib.rs index 9f9a4adf..d04bcb24 100644 --- a/plugins/log/src/lib.rs +++ b/plugins/log/src/lib.rs @@ -321,6 +321,11 @@ impl Builder { self } + pub fn chain>(mut self, logger: T) -> Self{ + self.dispatch = self.dispatch.chain(logger); + self + } + /// Removes all targets. Useful to ignore the default targets and reconfigure them. pub fn clear_targets(mut self) -> Self { self.targets.clear();