| Crates.io | fmtlog |
| lib.rs | fmtlog |
| version | 0.1.4 |
| created_at | 2021-01-17 13:18:32.404483+00 |
| updated_at | 2021-01-30 09:41:45.459713+00 |
| description | A simple configurable logger with format specification. |
| homepage | |
| repository | https://github.com/watcol/fmtlog |
| max_upload_size | |
| id | 343113 |
| size | 45,391 |
A simple configurable logger with format specification.

For more formats, see the Formats Collection.
Add to your Cargo.toml:
[dependencies]
log = "0.4"
fmtlog = "0.1.3"
These features are included by the default, but you can remove these features.
| Feature | Description |
|---|---|
chrono |
Enable timestamps. |
colored |
Coloring the log. |
Like this:
[dependencies.fmtlog]
version = "0.1.3"
default-features = false
features = ["chrono"]
and initialize the logger in your code:
#[macro_use]
extern crate log;
extern crate fmtlog;
fn main() {
fmtlog::default()
.set()
.unwrap();
error!("Something has failed.");
// ...
}
For advanced usage, read the API document.
API Documents are available on docs.rs.
This program is licensed under the MIT license.
See LICENSE for details.