pub struct Log { /* private fields */ }
Expand description
A basic log structure containing a vector of entries.
Implementations§
source§impl Log
impl Log
sourcepub fn set_log_file(&mut self, log_path: String)
pub fn set_log_file(&mut self, log_path: String)
Set the file which log entries will be written to.
pub fn info(&mut self, message: String)
pub fn debug(&mut self, message: String)
pub fn warning(&mut self, message: String)
pub fn error(&mut self, message: String)
sourcepub fn set_write(&mut self, mode: u32)
pub fn set_write(&mut self, mode: u32)
Set the write status of the log. This dictates what and how stuff is logged. Must be a value between 0-3. Below is a list of what the values mean. Note that all modes write the log to memory.
0 # Log entries are written to memory but nothing else.
1 # Log entries are automatically printed as they are created.
2 # Log entries are written to a set file as they are created.
3 # Mode 3 is a combination of mode 1 and 2.