Crates.io | logtra |
lib.rs | logtra |
version | 0.3.2 |
source | src |
created_at | 2023-03-10 12:18:50.048803 |
updated_at | 2023-03-24 18:06:38.969563 |
description | A minimal logging library |
homepage | |
repository | https://github.com/Homuncoli/logtra |
max_upload_size | |
id | 806401 |
size | 22,572 |
logtra is a logging library for Rust.
logtra is almost entirely macro based.
fn main() {
sink!(
ConsoleSink::new(
SinkDeclaration {
name: "console".to_string(),
severity: LogSeverity::Trace,
module: "".to_string(),
template: "[%t][%c][%[%i%]][%s][%f:%l]: %m\n".to_string(),
}
)
)
trace!("Hello World: Trace!");
debug!("Hello World: Debug!");
info!("Hello World: Info!");
warn!("Hello World: Warn!");
error!("Hello World: Error!");
fatal!("Hello World: Fatal!");
log!(Info, &obj);
}