pub struct LoggerBuilder { /* private fields */ }Expand description
日志记录器构建器
Implementations§
Source§impl LoggerBuilder
impl LoggerBuilder
Sourcepub fn simple_format(self) -> Self
pub fn simple_format(self) -> Self
使用简单格式器
Sourcepub fn json_format(self) -> Self
pub fn json_format(self) -> Self
使用JSON格式器
Sourcepub fn structured_format(self) -> Self
pub fn structured_format(self) -> Self
使用结构化格式器
Sourcepub fn output_to_file(self, path: &str) -> Self
pub fn output_to_file(self, path: &str) -> Self
输出到文件
Sourcepub fn output_to_stderr(self) -> Self
pub fn output_to_stderr(self) -> Self
输出到标准错误
Sourcepub fn include_context(self, include: bool) -> Self
pub fn include_context(self, include: bool) -> Self
包含上下文信息
Sourcepub fn build(self) -> ErrorLogger
pub fn build(self) -> ErrorLogger
构建日志记录器
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoggerBuilder
impl RefUnwindSafe for LoggerBuilder
impl Send for LoggerBuilder
impl Sync for LoggerBuilder
impl Unpin for LoggerBuilder
impl UnwindSafe for LoggerBuilder
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