Documentation

tinylog crates.io docs.rs license

I wrote this for my own projects. It's published in case anyone else wants to use it (and for my own convenience).

Usage

#[macro_use]
extern crate log;

fn main() {
  tinylog::init();
  info!("beep boop");
}

Configuration

Tinylog will use the RUST_LOG environment variable if set. By default, this is debug for debug builds and info for release builds.

  • error
  • warn
  • info
  • debug
  • trace
  • off

The NO_COLOR and FORCE_COLOR environment variables are also respected. FORCE_COLOR takes precedence.

Features

  • Enable the humantime feature to add timestamps to logs.
  • Enable the parking_lot feature to use its types instead of std types. This usually isn't needed unless your project already has parking_lot somewhere.