Coder Social home page Coder Social logo

alextmjugador / stderrlog-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cardoe/stderrlog-rs

0.0 1.0 0.0 214 KB

Rust log implementation that logs to stderr based on verbosity specified supports macros and colors

License: Apache License 2.0

Rust 100.00%

stderrlog-rs's Introduction

Build status Build status Average time to resolve an issue Percentage of issues still open Rust version Documentation Latest version All downloads Downloads of latest version

Logger that aims to provide a simple case of env_logger that just logs to stderr based on verbosity.

Documentation

For a working example for StructOpt, clap, and docopt please see the crate level documentation.

For example binaries showing how module level logging works, please see the large-example crate in examples/.

Supported Versions

  • stderrlog 0.6.x supports
    1. Rust 1.48.0 and newer
    2. log >= 0.4.11
  • stderrlog 0.5.x supports
    1. Rust 1.36.0 and newer
    2. log >= 0.4.11
  • stderrlog 0.4.x supports
    1. Rust 1.16.0 and newer
    2. log >= 0.4.1
  • stderrlog 0.3.x supports
    1. Rust 1.16.0 and newer
    2. log 0.3.x
  • stderrlog 0.2.x supports
    1. Rust 1.13.0 and newer
    2. log >= 0.3.0, < 0.3.9

Usage

Add this to your Cargo.toml:

[dependencies]
stderrlog = "0.4"

and this to your main():

stderrlog::new().verbosity(args.flag_v).quiet(args.flag_q).init().unwrap();

where your args struct is defined as:

struct Args {
    flag_v: usize,
    flag_q: bool,
    ...
}

stderrlog-rs's People

Contributors

alexanderkjall avatar alextmjugador avatar brettcannon avatar cardoe avatar dr-emann avatar edmorley avatar jeffcutsinger avatar kornelski avatar remexre avatar romanz avatar thiagoarrais avatar thomasantony avatar vincentdephily avatar ypoluektovich avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.