elog

Crates.ioelog
lib.rselog
version0.3.0
sourcesrc
created_at2016-11-11 16:54:53.505422
updated_at2016-12-10 03:19:58.767065
descriptionSimple logging for debugging.
homepagehttps://github.com/fengcen/elog
repositoryhttps://github.com/fengcen/elog.git
max_upload_size
id7209
size9,628
fvm-crate-owners (github:filecoin-project:fvm-crate-owners)

documentation

https://github.com/fengcen/elog

README

elog

status

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

Screenshot

License

elog is primarily distributed under the terms of the MIT license. See LICENSE for details.

Commit count: 0

cargo fmt