pub struct Logger {
    pub formatter: Formatter,
    pub writable_list: Vec<Output>,
}Expand description
Logger object.
Use Logger::new() to create logger objects instead of using this struct.
§Parameters
formatter: TheFormatterto use for formatting messageswritable_list: A vector ofOutputs to write to
§Returns
A new Logger object with the specified formatter and writables.
§Examples
logging_rs::Logger {
    formatter: logging_rs::Formatter::default(),
    writable_list: vec![logging_rs::Output::default()]
};Fields§
§formatter: Formatter§writable_list: Vec<Output>Implementations§
Source§impl Logger
 
impl Logger
Sourcepub fn new(formatter: Formatter, writable_list: Vec<Output>) -> Logger
 
pub fn new(formatter: Formatter, writable_list: Vec<Output>) -> Logger
Creates a new logger object.
§Parameters
formatter: TheFormatterto use for formatting messageswritable_list: A vector ofOutputs to write to
§Returns
A new Logger object with the specified formatter and writables.
§Examples
logging_rs::Logger::new(logging_rs::Formatter::default(), vec![logging_rs::Output::default()]);§See also
Sourcepub fn log(
    &self,
    message: &str,
    level: Level,
    path: &str,
    arguments: Vec<(&str, String)>,
)
 
pub fn log( &self, message: &str, level: Level, path: &str, arguments: Vec<(&str, String)>, )
Logs the given message.
§Parameters
self: The logger objectmessage: The message to loglevel: The logLevelto use for loggingpath: The path of the calling filearguments: A list of arguments to use when formatting the message
§Returns
A String containing the formatted message.
§Examples
logger.log(
    "Some message",
    logging_rs::Level::default(),
    "src/lib.rs",
    vec![]
);§See also
Trait Implementations§
Source§impl Ord for Logger
 
impl Ord for Logger
Source§impl PartialOrd for Logger
 
impl PartialOrd for Logger
impl Eq for Logger
impl StructuralPartialEq for Logger
Auto Trait Implementations§
impl Freeze for Logger
impl RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnwindSafe for Logger
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