GLib.debug (original) (raw)

GLib

API Version: 2.0

Library Version: 2.87.0

Function Macros

Generated by gi-docgen 2025.4

Function Macro

GLibdebug

since: 2.6

Declaration [src]


#define g_debug (
  ...
)

Description [src]

A convenience function/macro to log a debug message.

The message should typically not be translated to the user’s language.

If g_log_default_handler() is used as the log handler function, a new-line character will automatically be appended to @…, and need not be entered manually.

Such messages are suppressed by the g_log_default_handler() andg_log_writer_default() unless the G_MESSAGES_DEBUG orDEBUG_INVOCATION environment variables are set appropriately. If you need to set the allowed domains at runtime, useg_log_writer_default_set_debug_domains().

If structured logging is enabled, this will use g_log_structured(); otherwise it will use g_log(). SeeUsing Structured Logging.

Available since: 2.6

This function is not directly available to language bindings.

Parameters

...

Type: -

Format string, followed by parameters to insert into the format string (as with printf()).