gs-debug

gs-debug

Functions

Types and Values

#define GS_TYPE_DEBUG
  GsDebug

Description

Functions

gs_debug_new ()

GsDebug *
gs_debug_new (gchar **domains,
              gboolean verbose,
              gboolean use_time);

Create a new GsDebug with the given configuration.

Ownership of domains is transferred to this function. It will be freed with g_strfreev() when the GsDebug is destroyed.

Parameters

domains

a GStrv of debug log domains to output, or { "all", NULL } to output all debug log domains; NULL is equivalent to an empty array.

[transfer full][nullable]

verbose

whether to output log debug messages

 

use_time

whether to output a timestamp with each log message

 

Returns

a new GsDebug.

[transfer full]

Since: 40


gs_debug_new_from_environment ()

GsDebug *
gs_debug_new_from_environment (void);

Create a new GsDebug with its configuration loaded from environment variables.

Returns

a new GsDebug.

[transfer full]

Since: 40


gs_debug_set_verbose ()

void
gs_debug_set_verbose (GsDebug *self,
                      gboolean verbose);

Enable or disable verbose logging mode.

This can be called at any time, from any thread.

Parameters

self

a GsDebug

 

verbose

whether to output log debug messages

 

Since: 40

Types and Values

GS_TYPE_DEBUG

#define GS_TYPE_DEBUG (gs_debug_get_type ())

GsDebug

typedef struct _GsDebug GsDebug;