| Crates.io | colog |
| lib.rs | colog |
| version | 1.4.0 |
| created_at | 2017-04-26 18:33:59.335491+00 |
| updated_at | 2025-09-12 18:17:29.853549+00 |
| description | The `colog` library is a simple formatter backend for the standard rust logging system (in the `log` crate). |
| homepage | |
| repository | https://github.com/chrivers/rust-colog |
| max_upload_size | |
| id | 12124 |
| size | 58,395 |
The colog library is a simple formatter backend for the standard
rust logging system (in the log crate).
use log::{error, warn, info, debug, trace};
fn main() {
// Quick start: use default initialization
colog::init();
error!("error message");
error!("error with fmt: {}", 42);
warn!("warn message");
info!("info message");
debug!("debug message");
trace!("trace message");
info!("multi line demonstration\nhere");
info!("more\nmulti\nline\nhere\nhere");
}
This results in the following terminal output:

It's possible to override all colors and styles of colog.
See the following examples:
Also be sure to read the documentation (cargo doc --open) for a detailed description.
There are no known, serious, unsolved issues.
Patches welcome :)
This project is licensed under the LGPLv3. See the file LICENSE for
details.