Macro glib::debug[][src]

macro_rules! debug {
    (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::debug! 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::debug!("This will be logged under 'my-domain'");