Struct log4rs::append::console::ConsoleAppenderBuilder
source · pub struct ConsoleAppenderBuilder { /* private fields */ }
Expand description
A builder for ConsoleAppender
s.
Implementations§
source§impl ConsoleAppenderBuilder
impl ConsoleAppenderBuilder
sourcepub fn encoder(self, encoder: Box<dyn Encode>) -> ConsoleAppenderBuilder
pub fn encoder(self, encoder: Box<dyn Encode>) -> ConsoleAppenderBuilder
Sets the output encoder for the ConsoleAppender
.
sourcepub fn target(self, target: Target) -> ConsoleAppenderBuilder
pub fn target(self, target: Target) -> ConsoleAppenderBuilder
Sets the output stream to log to.
Defaults to Target::Stdout
.
sourcepub fn tty_only(self, tty_only: bool) -> ConsoleAppenderBuilder
pub fn tty_only(self, tty_only: bool) -> ConsoleAppenderBuilder
Sets the output to log only when it’s a TTY.
Defaults to false
.
sourcepub fn build(self) -> ConsoleAppender
pub fn build(self) -> ConsoleAppender
Consumes the ConsoleAppenderBuilder
, producing a ConsoleAppender
.
Auto Trait Implementations§
impl !RefUnwindSafe for ConsoleAppenderBuilder
impl Send for ConsoleAppenderBuilder
impl Sync for ConsoleAppenderBuilder
impl Unpin for ConsoleAppenderBuilder
impl !UnwindSafe for ConsoleAppenderBuilder
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