Skip to content

Commit

Permalink
Merge pull request rust-lang#165 from AndyGauge/doc-features
Browse files Browse the repository at this point in the history
Documentation: added max_log_level per target
  • Loading branch information
dtolnay committed May 24, 2017
2 parents 8a64037 + f847dff commit c84a485
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@
//! // Select env_logger, one possible logger implementation
//! // (see https://doc.rust-lang.org/log/env_logger/index.html)
//! env_logger::init().unwrap();
//!
//!
//! info!("starting up");
//! error!("error: {}", 404);
//!
//!
//! // ...
//! }
//! ```
Expand Down Expand Up @@ -188,6 +188,20 @@
//! }
//! ```
//!
//! # Features
//!
//! Optionally, when defining a `Cargo.toml` file, additional parameters can be passed that affect
//! the logger depending on the target of the build. Effectively, `max_level_*` and
//! `release_max_level_*` directives can be added as features of the log dependency. When
//! these are set, they override the behavior of the logging levels above the declared maximum
//! preventing anything higher from logging.
//!
//! ```toml
//! [dependencies.log]
//! version = "^0.3.7"
//! features = ["max_level_debug", "release_max_level_warn"]
//! ```
//!
//! [`Log`]: trait.Log.html
//! [level_link]: enum.Level.html
//! [`set_logger`]: fn.set_logger.html
Expand Down

0 comments on commit c84a485

Please sign in to comment.