diff --git a/Cargo.toml b/Cargo.toml
index 5ea70e4..ad5f50b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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 = []
diff --git a/README.md b/README.md
index b2292ac..cbb9279 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,8 @@
[
](https://docs.rs/delog)
[
](https://github.com/nickray/delog/actions?query=branch%3Amain)
+Deferred logging, an implementation and extension of Rust's standard logging facade.
+
#### License
diff --git a/src/macros.rs b/src/macros.rs
index 296ebfe..fff28c5 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -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)+) ); }