[−][src]Crate simple_log
simple-log is a very simple configuration log crates.
Quick Start
To get you started quickly, the easiest and quick way to used with demo or test project
#[macro_use] extern crate log; fn main() -> Result<(), String> { simple_log::quick()?; debug!("test builder debug"); info!("test builder info"); Ok(()) }
Usage in project
Configuration LogConfig in your project.
#[macro_use] extern crate log; use simple_log::LogConfigBuilder; fn main() -> Result<(), String> { let config = LogConfigBuilder::builder() .path("./log/builder_log.log") .size(1 * 100) .roll_count(10) .level("debug") .output_file() .output_console() .build(); simple_log::new(config)?; debug!("test builder debug"); info!("test builder info"); Ok(()) }
For the user guide and futher documentation, please read The Rust simple doc.
Modules
log_level |
Structs
LogConfig | |
LogConfigBuilder | The LogConfig with builder wrapper. |
Functions
console | Provide init simple-log instance with stdout console on terminal. |
file | Provide init simple-log instance with write file. |
get_log_conf | |
new | The new method provide init simple-log instance with config. |
quick | This method can quick init simple-log with no configuration. |
update_log_conf | |
update_log_level | update simple-log global config log level. |