Macro glib::error [−][src]
macro_rules! error {
(target : $target : expr, $($arg : tt) +) => { ... };
($($arg : tt) +) => { ... };
}
This is supported on crate feature
log_macros
only.Expand description
A macro which behaves exactly as log::error!
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::error!("This will be logged under 'my-domain'");