glib

Macro trace

Source
macro_rules! trace {
    (target: $target:expr, $($arg:tt)+) => { ... };
    ($($arg:tt)+) => { ... };
}
Available on crate features log and log_macros only.
Expand description

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