-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #440 from guswynn/tracing
add `tracing` feature
- Loading branch information
Showing
12 changed files
with
79 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//! A wrapper module to export logging functionality from | ||
//! [`log`] or [`tracing`] depending on the `tracing` feature. | ||
//! | ||
//! [`log`]: https://docs.rs/log | ||
//! [`tracing`]: https://docs.rs/tracing | ||
|
||
#[cfg(not(feature = "tracing"))] | ||
pub use log::Level::{Debug as DEBUG, Info as INFO, Warn as WARN}; | ||
#[cfg(not(feature = "tracing"))] | ||
pub use log::{debug, error, info, log_enabled, trace, warn}; | ||
|
||
#[cfg(feature = "tracing")] | ||
pub use tracing::{debug, enabled as log_enabled, error, info, trace, warn}; | ||
#[cfg(feature = "tracing")] | ||
pub const DEBUG: tracing::Level = tracing::Level::DEBUG; | ||
#[cfg(feature = "tracing")] | ||
pub const INFO: tracing::Level = tracing::Level::INFO; | ||
#[cfg(feature = "tracing")] | ||
pub const WARN: tracing::Level = tracing::Level::WARN; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters