macro_rules! warn {
(target: $target:expr, $($arg:tt)+) => { ... };
($($arg:tt)+) => { ... };
}
Available on crate feature
log_macros
only.Expand description
A macro which behaves exactly as log::warn!
except that it sets the
current log target to the contents of a G_LOG_DOMAIN
constant (and fails
to build if not defined).
In order to use this macro, glib
must be built with the log_macros
feature enabled and the GlibLogger
must have been
initialized using GlibLoggerDomain::CrateTarget
.
static G_LOG_DOMAIN: &str = "my-domain";
glib::warn!("This will be logged under 'my-domain'");