folks Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
FolksDebugFolksDebug — Manage debug output and status reporting for all folks objects. All GLib debug logging calls are passed through a log handler in this class, which allows debug domains to be outputted according to whether they've been enabled by being passed to |
#define FOLKS_TYPE_DEBUG void folks_debug_emit_print_status (FolksDebug *self
); void folks_debug_indent (FolksDebug *self
); void folks_debug_unindent (FolksDebug *self
); void folks_debug_print_line (FolksDebug *self
,const gchar *domain
,GLogLevelFlags level
,const gchar *format
,...
); void folks_debug_print_heading (FolksDebug *self
,const gchar *domain
,GLogLevelFlags level
,const gchar *format
,...
); void folks_debug_print_key_value_pairs (FolksDebug *self
,const gchar *domain
,GLogLevelFlags level
,...
); #define FOLKS_DEBUG_STATUS_LOG_DOMAIN gboolean folks_debug_get_colour_enabled (FolksDebug *self
); void folks_debug_set_colour_enabled (FolksDebug *self
,gboolean value
); gboolean folks_debug_get_debug_output_enabled (FolksDebug *self
); void folks_debug_set_debug_output_enabled (FolksDebug *self
,gboolean value
); FolksDebug * folks_debug_dup (void
); FolksDebug * folks_debug_dup_with_flags (const gchar *debug_flags
,gboolean colour_enabled
); struct FolksDebug;
void folks_debug_emit_print_status (FolksDebug *self
);
Causes all significant objects in the library to print their current status to standard output, obeying the options set on this
instance for colouring and other formatting.
folks_debug_new()
|
the FolksDebug instance |
Since 0.5.1
void folks_debug_indent (FolksDebug *self
);
Increment the indentation level used when printing output through the object.
This is intended to be used by backend libraries only.
|
the FolksDebug instance |
Since 0.5.1
void folks_debug_unindent (FolksDebug *self
);
Decrement the indentation level used when printing output through the object.
This is intended to be used by backend libraries only.
|
the FolksDebug instance |
Since 0.5.1
void folks_debug_print_line (FolksDebug *self
,const gchar *domain
,GLogLevelFlags level
,const gchar *format
,...
);
Print a debug line with the current indentation level for the specified debug domain.
This is intended to be used by backend libraries only.
|
Arguments for the format string. [in] |
|
the FolksDebug instance |
|
The debug domain name. [in] |
|
A set of log level flags for the message. [in] |
|
A printf-style format string for the heading. [in] |
Since 0.5.1
void folks_debug_print_heading (FolksDebug *self
,const gchar *domain
,GLogLevelFlags level
,const gchar *format
,...
);
Print a debug line as a heading. It will be coloured according to the current indentation level so that different levels of headings stand out.
This is intended to be used by backend libraries only.
|
Arguments for the format string. [in] |
|
the FolksDebug instance |
|
The debug domain name. [in] |
|
A set of log level flags for the message. [in] |
|
A printf-style format string for the heading. [in] |
Since 0.5.1
void folks_debug_print_key_value_pairs (FolksDebug *self
,const gchar *domain
,GLogLevelFlags level
,...
);
Print a set of key–value pairs in a table. The width of the key column is automatically set to the width of the longest key. The keys and values must be provided as a null-delimited list of alternating key–value varargs. Values may be null but keys may not.
This is intended to be used by backend libraries only.
The table will be printed at the current indentation level plus one.
|
Alternating keys and values, terminated with null. [in] |
|
the FolksDebug instance |
|
The debug domain name. [in] |
|
A set of log level flags for the message. [in] |
Since 0.5.1
#define FOLKS_DEBUG_STATUS_LOG_DOMAIN "folks-status"
Log domain for the status messages logged as a result of calling
.
folks_debug_emit_print_status()
This could be used in conjunction with a log handler to redirect the status information to a debug window or log file, for example.
Since 0.5.1
gboolean folks_debug_get_colour_enabled (FolksDebug *self
);
|
the FolksDebug instance to query |
Returns : |
the value of the "colour-enabled" property |
void folks_debug_set_colour_enabled (FolksDebug *self
,gboolean value
);
|
the FolksDebug instance to modify |
|
the new value of the "colour-enabled" property |
gboolean folks_debug_get_debug_output_enabled
(FolksDebug *self
);
|
the FolksDebug instance to query |
Returns : |
the value of the "debug-output-enabled" property |
void folks_debug_set_debug_output_enabled (FolksDebug *self
,gboolean value
);
|
the FolksDebug instance to modify |
|
the new value of the "debug-output-enabled" property |
FolksDebug * folks_debug_dup (void
);
Create or return the singleton
class instance. If the instance doesn't exist already, it will be created with no debug domains enabled.
folks_debug_new()
This function is thread-safe.
Returns : |
Singleton instance |
Since 0.5.1
FolksDebug * folks_debug_dup_with_flags (const gchar *debug_flags
,gboolean colour_enabled
);
Create or return the singleton
class instance. If the instance doesn't exist already, it will be created with the given set of debug domains enabled. Otherwise, the existing instance will have its set of enabled domains changed to the provided set.
folks_debug_new()
|
A comma-separated list of debug domains to enable, or null to disable debug output. [in][allow-none] |
|
Whether debug output should be coloured using terminal escape sequences. [in] |
Returns : |
Singleton instance |
Since 0.5.1
struct FolksDebug;
Manage debug output and status reporting for all folks objects. All GLib debug logging calls are passed through a log handler in this class, which allows debug domains to be outputted according to whether they've been enabled by being passed to
.
folks_debug_dup()
Since 0.5.1
"colour-enabled"
property "colour-enabled" gboolean : Read / Write
colour-enabled.
Default value: FALSE
"print-status"
signalvoid user_function (FolksDebug *debug,
gpointer user_data) : Run Last
Signal emitted in the main thread whenever objects should print their current status. All significant objects in the library should connect to this and print their current status in some suitable format when it's emitted.
Client processes should emit this signal by calling
.folks_debug_emit_print_status()
|
the FolksDebug instance that received the signal |
|
user data set when the signal handler was connected. |
Since 0.5.1