writer_default_set_use_stderr


Description:

[ Version ( since = "2.68" ) ]
public void writer_default_set_use_stderr (bool use_stderr)

Configure whether the built-in log functions (default_handler for the old-style API, and both writer_default and 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.

Parameters:

use_stderr

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


Namespace: GLib.Log
Package: glib-2.0



2022 vala-language.org