![]() |
![]() |
![]() |
telepathy-glib Reference Manual | ![]() |
---|---|---|---|---|
#include <telepathy-glib/debug.h> void tp_debug_set_flags_from_string (const gchar *flags_string); void tp_debug_set_flags_from_env (const gchar *var); void tp_debug_set_all_flags (void);
telepathy-glib has an internal mechanism for debug messages and filtering.
Connection managers written with telepathy-glib are expected to connect
this to their own debugging mechanisms: when the CM's debugging mechanism
is activated, it should call tp_debug_set_flags_from_string()
,
tp_debug_set_flags_from_env()
or tp_debug_set_all_flags()
.
For example, at the time of writing Gabble has the following behaviour:
tp_debug_set_flags_from_env ("GABBLE_DEBUG")
.tp_debug_set_all_flags()
to activate
all possible debug output in telepathy-glib.
The supported debug-mode keywords are subject to change, but currently include:
persist
- keep running even if there are no
connections for a whileconnection
- output debug messages regarding
TpBaseConnection
im
- output debug messages regarding
(text) instant messagingproperties
- output debug messages regarding
TpPropertiesMixin
params
- output debug messages regarding
connection manager parametersall
- all of the above
void tp_debug_set_flags_from_string (const gchar *flags_string);
Set the debug flags indicated by flags_string
, in addition to any already
set.
The parsing matches that of g_parse_debug_string()
.
flags_string : |
The flags to set, comma-separated. If NULL or empty,
no additional flags are set.
|
void tp_debug_set_flags_from_env (const gchar *var);
Set the debug flags indicated by the given environment variable, in
addition to any already set. Equivalent to
tp_debug_set_flags_from_string (g_getenv (var))
.
var : |
The name of the environment variable to parse |