pub struct LoggerManagerBuilder { /* private fields */ }Expand description
Builder for LoggerManager. Obtain one via LoggerManager::builder.
Implementations§
Source§impl LoggerManagerBuilder
impl LoggerManagerBuilder
Sourcepub fn level(self, level: LogLevel) -> Self
pub fn level(self, level: LogLevel) -> Self
Sets the minimum log level (default: LogLevel::Info).
Sourcepub fn log_path(self, path: impl Into<PathBuf>) -> Self
pub fn log_path(self, path: impl Into<PathBuf>) -> Self
Sets the directory where log files are stored (default: "logs").
Sourcepub fn retention_days(self, days: i64) -> Self
pub fn retention_days(self, days: i64) -> Self
Sets how many days to keep log files before deletion (default: 7).
Sourcepub async fn build(self) -> Arc<LoggerManager> ⓘ
pub async fn build(self) -> Arc<LoggerManager> ⓘ
Starts the logger and returns an Arc<LoggerManager>.
Auto Trait Implementations§
impl Freeze for LoggerManagerBuilder
impl RefUnwindSafe for LoggerManagerBuilder
impl Send for LoggerManagerBuilder
impl Sync for LoggerManagerBuilder
impl Unpin for LoggerManagerBuilder
impl UnsafeUnpin for LoggerManagerBuilder
impl UnwindSafe for LoggerManagerBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more