woodpecker

Crates.iowoodpecker
lib.rswoodpecker
version0.4.0
sourcesrc
created_at2017-04-24 23:42:53.430528
updated_at2017-06-19 22:28:50.112118
descriptionFast and extensible logging for Rust
homepagehttps://github.com/niamster/woodpecker
repositoryhttps://github.com/niamster/woodpecker
max_upload_size
id11892
size168,739
Dmytro Milinevskyi (niamster)

documentation

https://docs.rs/woodpecker

README

Woodpecker

Crates.io Docs.rs Linux Build Status Windows Build Status Codecov Coveralls License

Woodpecker - Logging for Rust

Table of Contents

Introduction

woodpecker is a logging framework for Rust.

The goal is to have a fast, extensible and easy logging in Rust application.

Status

The project is currently under development and doesn't provide a lot of features.

Although the basic feature logging is well supported!

Features

The main feature is almost zero overhead if no filtering rules are defined and log is not produced.

Currently supported:

  • pluggable format function
  • definition of the logging rules via RUST_LOG environment variable
  • multiple log consumers
  • filtering by module (any part of the module path)
  • filtering by file (any part of the file path)
  • filtering by a line range within a file
  • conditional code execution depending on the log level
  • logging in a dedicated thread
  • logging to stdout/stderr
  • logging to a file
  • log file rotation (by size)

Documentation

Most of the useful documentation can be gotten using rustdoc.

Check it out on docs.rs/woodpecker.

In your project

In Cargo.toml:

[dependencies]
woodpecker = "0.4"

In your main.rs:

#[macro_use]
extern crate woodpecker;
use woodpecker as wp;

fn main() {
    wp::init();

    wp_set_level!(wp::LogLevel::INFO).unwrap();

    info!("It's alive!");
}

See examples/basic.rs for the quick overview.

License

Woodpecker project is licensed under Apache-2.0 license.

Logo is licensed under Creative Commons Attribution (CC BY).

Credits

Sprockets for logo are provided by Jon Daiello and Ray Uribe from the Noun Project under Creative Commons Attribution (CC BY).

Commit count: 115

cargo fmt