pub struct LogOutput {
pub stderr_output: StderrStream,
pub file_output: FileStream,
pub buffer_output: BufferStream,
/* private fields */
}Expand description
Wraps StderrStream, BufferStream and FileStream in one object used
internally by Logger.
§Examples
Printing log to stderr:
// Required by `LogOutput` for parsing logs
let mut formatter = LogFormatter::default();
// By default, only output to `stderr` is enabled
let mut log_output = LogOutput::default();
// Print "Hello, World!" in a neat log format
log_output.out(&LogStruct::debug("Hello, World!"), &mut formatter);Fields§
§stderr_output: StderrStreamThe stderr output stream.
file_output: FileStreamFile output stream for writing logs to a file.
buffer_output: BufferStreamBuffer stream for storing log messages.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogOutput
impl<'de> Deserialize<'de> for LogOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for LogOutput
impl Ord for LogOutput
Source§impl PartialOrd for LogOutput
impl PartialOrd for LogOutput
Source§impl Toggleable for LogOutput
impl Toggleable for LogOutput
impl Eq for LogOutput
impl StructuralPartialEq for LogOutput
Auto Trait Implementations§
impl Freeze for LogOutput
impl RefUnwindSafe for LogOutput
impl Send for LogOutput
impl Sync for LogOutput
impl Unpin for LogOutput
impl UnwindSafe for LogOutput
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