[][src]Macro glib::g_debug

macro_rules! g_debug {
    ($log_domain:expr, $format:expr, $($arg:expr),* $(,)?) => { ... };
    ($log_domain:expr, $format:expr $(,)?) => { ... };
}

Macro used to log using GLib logging system. It uses g_log.

It is the same as calling the g_log! macro with LogLevel::Debug.

Example:

use glib::g_debug;

g_debug!("test", "test");
// Equivalent to:
use glib::{g_log, LogLevel};
g_log!("test", LogLevel::Debug, "test");

// trailing commas work as well:
g_debug!("test", "test",);

// You can also pass arguments like in format! or println!:
let x = 12;
g_debug!("test", "test: {}", x);
g_debug!("test", "test: {} {}", x, "a");
// trailing commas work as well:
g_debug!("test", "test: {} {}", x, "a",);