Crates.io | cli_color_log |
lib.rs | cli_color_log |
version | 0.1.1 |
source | src |
created_at | 2020-02-08 16:20:30.782914 |
updated_at | 2020-02-09 01:54:44.755444 |
description | A convenient color log tool for cli. |
homepage | https://github.com/zhangkefei/cli_color_log.git |
repository | https://github.com/zhangkefei/cli_color_log.git |
max_upload_size | |
id | 206392 |
size | 10,632 |
A convenient color log tool for cli.
use cli_color_log::Logger;
use cli_color_log::LogType;
fn main() {
let logger = Logger::new(12);
logger.info("This is a info message.");
logger.warn("This is a warning message.");
logger.error("This is a error message.");
logger.style_log(LogType::Info, "Download", "This is a custom style message.");
logger.style_log(LogType::Plain, "Console", "This is a plain style message.");
logger.log("This is a plain log message.");
}