mirror of
https://github.com/trussed-dev/delog.git
synced 2026-06-20 04:16:34 -07:00
Export gated macros so they turn up in a library's documentation
This commit is contained in:
@@ -23,4 +23,5 @@ insta = "1.3.0"
|
||||
|
||||
[features]
|
||||
example = ["std"]
|
||||
# sole reason for this is to enable `print!` in the example's `Std{err,out}Flusher`
|
||||
std = []
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-delog-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K" height="20">](https://docs.rs/delog)
|
||||
[<img alt="build status" src="https://img.shields.io/github/workflow/status/nickray/delog/CI/main?style=for-the-badge" height="20">](https://github.com/nickray/delog/actions?query=branch%3Amain)
|
||||
|
||||
Deferred logging, an implementation and extension of Rust's standard logging facade.
|
||||
|
||||
#### License
|
||||
|
||||
<sup>
|
||||
|
||||
+29
-29
@@ -64,7 +64,7 @@ macro_rules! generate_macros {
|
||||
|
||||
/// Fallible version of `debug!`.
|
||||
#[cfg(all(any(feature = "log-all", feature = "log-debug"), not(feature = "log-none")))]
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
macro_rules! try_debug {
|
||||
|
||||
(target: $target:expr, $d($arg:tt)+) => (
|
||||
@@ -78,7 +78,7 @@ macro_rules! generate_macros {
|
||||
|
||||
/// Fallible version of `debug!`.
|
||||
#[cfg(not(all(any(feature = "log-all", feature = "log-debug"), not(feature = "log-none"))))]
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
macro_rules! try_debug {
|
||||
|
||||
// (target: $target:expr, $d($arg:tt)+) => ( core::result::Result::<(), ()>::Ok(()) );
|
||||
@@ -87,7 +87,7 @@ macro_rules! generate_macros {
|
||||
|
||||
/// Fallible version of `error!`.
|
||||
#[cfg(all(any(feature = "log-all", feature = "log-error"), not(feature = "log-none")))]
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
macro_rules! try_error {
|
||||
|
||||
(target: $target:expr, $d($arg:tt)+) => (
|
||||
@@ -101,7 +101,7 @@ macro_rules! generate_macros {
|
||||
|
||||
/// Fallible version of `error!`.
|
||||
#[cfg(not(all(any(feature = "log-all", feature = "log-error"), not(feature = "log-none"))))]
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
macro_rules! try_error {
|
||||
|
||||
// (target: $target:expr, $d($arg:tt)+) => ( core::result::Result::<(), ()>::Ok(()) );
|
||||
@@ -110,7 +110,7 @@ macro_rules! generate_macros {
|
||||
|
||||
/// Fallible version of `info!`.
|
||||
#[cfg(all(any(feature = "log-all", feature = "log-info"), not(feature = "log-none")))]
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
macro_rules! try_info {
|
||||
|
||||
(target: $target:expr, $d($arg:tt)+) => (
|
||||
@@ -124,7 +124,7 @@ macro_rules! generate_macros {
|
||||
|
||||
/// Fallible version of `info!`.
|
||||
#[cfg(not(all(any(feature = "log-all", feature = "log-info"), not(feature = "log-none"))))]
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
macro_rules! try_info {
|
||||
|
||||
// (target: $target:expr, $d($arg:tt)+) => ( core::result::Result::<(), ()>::Ok(()) );
|
||||
@@ -133,7 +133,7 @@ macro_rules! generate_macros {
|
||||
|
||||
/// Fallible version of `trace!`.
|
||||
#[cfg(all(any(feature = "log-all", feature = "log-trace"), not(feature = "log-none")))]
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
macro_rules! try_trace {
|
||||
|
||||
(target: $target:expr, $d($arg:tt)+) => (
|
||||
@@ -147,7 +147,7 @@ macro_rules! generate_macros {
|
||||
|
||||
/// Fallible version of `trace!`.
|
||||
#[cfg(not(all(any(feature = "log-all", feature = "log-trace"), not(feature = "log-none"))))]
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
macro_rules! try_trace {
|
||||
|
||||
(target: $target:expr, $d($arg:tt)+) => ( core::result::Result::<(), ()>::Ok(()) );
|
||||
@@ -156,7 +156,7 @@ macro_rules! generate_macros {
|
||||
|
||||
/// Fallible version of `warn!`.
|
||||
#[cfg(all(any(feature = "log-all", feature = "log-warn"), not(feature = "log-none")))]
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
macro_rules! try_warn {
|
||||
|
||||
(target: $target:expr, $d($arg:tt)+) => (
|
||||
@@ -170,7 +170,7 @@ macro_rules! generate_macros {
|
||||
|
||||
/// Fallible version of `warn!`.
|
||||
#[cfg(not(all(any(feature = "log-all", feature = "log-warn"), not(feature = "log-none"))))]
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
macro_rules! try_warn {
|
||||
|
||||
(target: $target:expr, $d($arg:tt)+) => ( core::result::Result::<(), ()>::Ok(()) );
|
||||
@@ -179,7 +179,7 @@ macro_rules! generate_macros {
|
||||
|
||||
#[cfg(not(feature = "log-none"))]
|
||||
/// Local version of `log!`.
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
macro_rules! log {
|
||||
(target: $target:expr, $d($arg:tt)+) => ( $crate::try_log!(target: $target, $d($arg)+).ok() );
|
||||
($d($arg:tt)+) => ( $crate::try_log!($d($arg)+).ok() );
|
||||
@@ -187,80 +187,80 @@ macro_rules! generate_macros {
|
||||
|
||||
#[cfg(feature = "log-none")]
|
||||
/// Local version of `log!`.
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
macro_rules! log {
|
||||
($d($arg:tt)+) => ( core::result::Result::<(), ()>::Ok(()) );
|
||||
}
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Local version of `debug!`.
|
||||
macro_rules! debug { ($d($arg:tt)+) => ( try_debug!($d($arg)+).ok() ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Local version of `error!`.
|
||||
macro_rules! error { ($d($arg:tt)+) => ( try_error!($d($arg)+).ok() ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Local version of `info!`.
|
||||
macro_rules! info { ($d($arg:tt)+) => ( try_info!($d($arg)+).ok() ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Local version of `trace!`.
|
||||
macro_rules! trace { ($d($arg:tt)+) => ( $try_trace!($d($arg)+).ok() ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Local version of `warn!`.
|
||||
macro_rules! warn { ($d($arg:tt)+) => ( try_warn!($d($arg)+).ok() ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Immediate version of `log!`.
|
||||
macro_rules! log_now {
|
||||
($lvl:expr, $d($arg:tt)+) => ( log!(target: "!", $lvl, $d($arg)+) );
|
||||
}
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Immediate version of `debug!`.
|
||||
macro_rules! debug_now { ($d($arg:tt)+) => ( debug!(target: "!", $d($arg)+) ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Immediate version of `error!`.
|
||||
macro_rules! error_now { ($d($arg:tt)+) => ( error!(target: "!", $d($arg)+) ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Immediate version of `info!`.
|
||||
macro_rules! info_now { ($d($arg:tt)+) => ( info!(target: "!", $d($arg)+) ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Immediate version of `trace!`.
|
||||
macro_rules! trace_now { ($d($arg:tt)+) => ( trace!(target: "!", $d($arg)+) ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Immediate version of `warn!`.
|
||||
macro_rules! warn_now { ($d($arg:tt)+) => ( warn!(target: "!", $d($arg)+) ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Fallible immediate version of `log!`.
|
||||
macro_rules! try_log_now {
|
||||
($lvl:expr, $d($arg:tt)+) => ( try_log!(target: "!", $lvl, $d($arg)+) );
|
||||
}
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Fallible immediate version of `debug!`.
|
||||
macro_rules! try_debug_now { ($d($arg:tt)+) => ( try_debug!(target: "!", $d($arg)+) ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Fallible immediate version of `error!`.
|
||||
macro_rules! try_error_now { ($d($arg:tt)+) => ( try_error!(target: "!", $d($arg)+) ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Fallible immediate version of `info!`.
|
||||
macro_rules! try_info_now { ($d($arg:tt)+) => ( try_info!(target: "!", $d($arg)+) ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Fallible immediate version of `trace!`.
|
||||
macro_rules! try_trace_now { ($d($arg:tt)+) => ( try_trace!(target: "!", $d($arg)+) ); }
|
||||
|
||||
#[macro_use]
|
||||
#[macro_use] #[macro_export]
|
||||
/// Fallible immediate version of `warn!`.
|
||||
macro_rules! try_warn_now { ($d($arg:tt)+) => ( try_warn!(target: "!", $d($arg)+) ); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user