[−][src]Function simple_log::quick
pub fn quick() -> Result<(), String>
This method can quick init simple-log with no configuration.
If your just want use in demo or test project. Your can use this method. The quick method not add any params in method. It's so easy.
The LogConfig
filed just used inner default value.
path: ./tmp/simple_log.log //output file path
level: debug //log level
size: 10 //single log file size with unit:MB. 10MB eq:10*1024*1024
out_kind:[file,console] //Output to file and terminal at the same time
roll_count:10 //At the same time, it can save 10 files endwith .gz
If you don't want use quick method.Also can use new method.
Examples
ⓘThis code runs with edition 2018
#[macro_use] extern crate log; fn main() -> Result<(), String> { simple_log::quick()?; debug!("test builder debug"); info!("test builder info"); Ok(()) }