Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niamster/woodpecker
Logging for Rust
https://github.com/niamster/woodpecker
extensible fast log logging logging-library rust rust-library
Last synced: 3 months ago
JSON representation
Logging for Rust
- Host: GitHub
- URL: https://github.com/niamster/woodpecker
- Owner: niamster
- License: apache-2.0
- Created: 2017-04-24T23:39:21.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-03-18T22:03:54.000Z (almost 4 years ago)
- Last Synced: 2024-10-20T00:59:25.501Z (4 months ago)
- Topics: extensible, fast, log, logging, logging-library, rust, rust-library
- Language: Rust
- Size: 158 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ![Woodpecker](https://cdn.rawgit.com/niamster/woodpecker/master/logo/woodpecker.png)
[![Crates.io](https://img.shields.io/crates/v/woodpecker.svg)](https://crates.io/crates/woodpecker)
[![Docs.rs](https://docs.rs/woodpecker/badge.svg)](https://docs.rs/woodpecker)
[![Linux Build Status](https://travis-ci.org/niamster/woodpecker.svg?branch=master)](https://travis-ci.org/niamster/woodpecker)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/ljd6pkh8fsx7oh7a/branch/master?svg=true)](https://ci.appveyor.com/project/niamster/woodpecker)
[![Codecov](https://codecov.io/gh/niamster/woodpecker/branch/master/graph/badge.svg)](https://codecov.io/gh/niamster/woodpecker)
[![Coveralls](https://coveralls.io/repos/github/niamster/woodpecker/badge.svg?branch=master)](https://coveralls.io/github/niamster/woodpecker?branch=master)
[![License](https://img.shields.io/crates/l/woodpecker.svg)](https://opensource.org/licenses/Apache-2.0)# Woodpecker - Logging for [Rust][rust]
### Table of Contents
* [Status](#status)
* [`woodpecker` crate in your project](#in-your-project)
* [Features](#features)
* [License](#license)
* [Credits](#credits)### Introduction
`woodpecker` is a logging framework for [Rust][rust].
The goal is to have a fast, extensible and easy logging in [Rust][rust] application.
[rust]: http://rust-lang.org
### 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](https://docs.rs/woodpecker).
### In your project
In Cargo.toml:
```toml
[dependencies]
woodpecker = "0.4"
```In your `main.rs`:
```rust
#[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](https://github.com/niamster/woodpecker/blob/master/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).