Crates.io | rogger |
lib.rs | rogger |
version | 0.1.1 |
source | src |
created_at | 2022-12-18 08:06:20.079274 |
updated_at | 2022-12-23 23:21:03.524997 |
description | Logging macros for Rinrin.rs |
homepage | |
repository | https://github.com/Rinrin0413/rogger.git |
max_upload_size | |
id | 740275 |
size | 100,748 |
Logging macros for Rinrin.rs
This crate is VERY optimized for Rinrin.rs
so it may not be suitable for other projects.
but usage is very simple and easy.
Add the following to your Cargo.toml
file:
[dependencies]
rogger = "*"
chrono = "0.4"
colored = "2"
Choose the version of the crate freely but it is safer to do as above.
use rogger::*;
use colored::Colorize;
fn main() {
let ver = "0.1.0";
info!("Version: {}", ver);
let dev = "Foo PC";
warn!("Your device \"{}\" is deprecated", dev);
let err = "Operating System is not found";
error!("Fatal: {}", err);
let buf = 0x12345678;
debug!("Buffer: 0x{:x}", buf);
let age = 17;
trace!("Age: {}", age);
flag!();
flag!("i wake up!");
}
jst
: Use JST for timestamps.
utc_jst
: Provide additional logging macros as *_jst!()
in module jst
.