From 8226d74fb91de41deffceab0bdc207fb6ecc5dca Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 9 Jul 2024 19:39:33 +0200 Subject: [PATCH] feat(log): apperently, it wasn't possible to set a min log level? --- members/libpt-log/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/members/libpt-log/src/lib.rs b/members/libpt-log/src/lib.rs index 74fca05..e307ff7 100644 --- a/members/libpt-log/src/lib.rs +++ b/members/libpt-log/src/lib.rs @@ -329,6 +329,15 @@ impl LoggerBuilder { self.uptime = uptime; self } + + /// set the lowest loglevel to be displayed + /// + /// Default: [`Level::INFO`] + #[must_use] + pub const fn set_level(mut self, max_level: Level) -> Self { + self.max_level = max_level; + self + } } impl Default for LoggerBuilder {