GLib.log
Description: Reference for GLib.log

### Function

# GLiblog

#### Declaration [src]

    void
    g_log (
      const gchar* log_domain,
      GLogLevelFlags log_level,
      const gchar* format,
      ...
    )

#### Description [src]

Logs an error or debugging message.

If the log level has been set as fatal, `G_BREAKPOINT()` is called to terminate the program. See the documentation for `G_BREAKPOINT()` for details of the debugging options this provides.

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.

If structured logging is enabled this will output via the structured log writer function (see `g_log_set_writer_func()`).

This function is not directly available to language bindings.

#### Parameters

`log_domain`

  Type: `const gchar*`

  The log domain, usually `G_LOG_DOMAIN`, or `NULL` for the default.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`log_level`

  Type: `GLogLevelFlags`

  The log level, either from `GLogLevelFlags` or a user-defined level.

`format`

  Type: `const gchar*`

  The message format. See the `printf()` documentation.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`...`

  Type: ``

  The parameters to insert into the format string.