Function

GLiblog_writer_default_set_use_stderr

Declaration [src]

void
g_log_writer_default_set_use_stderr (
  gboolean use_stderr
)

Description [src]

Configure whether the built-in log functions (g_log_default_handler() for the old-style API, and both g_log_writer_default() and g_log_writer_standard_streams() for the structured API) will output all log messages to stderr.

By default, log messages of levels G_LOG_LEVEL_INFO and G_LOG_LEVEL_DEBUG are sent to stdout, and other log messages are sent to stderr. This is problematic for applications that intend to reserve stdout for structured output such as JSON or XML.

This function sets global state. It is not thread-aware, and should be called at the very start of a program, before creating any other threads or creating objects that could create worker threads of their own.

Available since:2.68

Parameters

use_stderr gboolean
 

If TRUE, use stderr for log messages that would normally have appeared on stdout