3 releases (breaking)
Uses old Rust 2015
0.3.0 | Dec 10, 2016 |
---|---|
0.2.0 | Dec 1, 2016 |
0.1.0 | Nov 11, 2016 |
#23 in #easy
Used in ecla
9KB
237 lines
elog
Just for debugging in Rust.
Usage
Add dependency to Cargo.toml
[dependencies]
elog = "^0.3"
In your main.rs
or lib.rs
:
#[macro_use]
extern crate elog;
trace!()
will use current thread id as prefix.
Macros
trace!(value);
debug!(value);
debug!("formatted: {}", value);
info!(value);
error!(value);
warn!(value);
Macros for command line application
infos!(message);
infos!("formatted message: {}", message);
warns!(message);
errors!(message);
errors_and_exit!(message);
Logging level setup
Set your environment variable: ELOG
.
ELOG
defaults to the trace
level.
ELOG
only used for normal macros. Command line macros will always print messages.
Supported values:
- trace
- debug
- info
- warn
- error
Screenshots
License
elog is primarily distributed under the terms of the MIT license. See LICENSE for details.
Dependencies
~0.7–8MB
~57K SLoC