Macro glib::info

source · []
macro_rules! info {
    (target: $target:expr, $($arg:tt)+) => { ... };
    ($($arg:tt)+) => { ... };
}
Available on crate feature log_macros only.
Expand description

A macro which behaves exactly as log::info! 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::info!("This will be logged under 'my-domain'");