osso-abook-debug

osso-abook-debug — Debugging and instrumentation facilities.

Synopsis

enum                OssoABookDebugFlags;
void                osso_abook_debug_init               (void);
gboolean            osso_abook_debug_write_pixbuf       (GdkPixbuf *pixbuf,
                                                         const char *filename,
                                                         OssoABookContact *contact);
gboolean            osso_abook_debug_write_pixbuf_prefix
                                                        (GdkPixbuf *pixbuf,
                                                         const char *filename_prefix,
                                                         OssoABookContact *contact);
#define             OSSO_ABOOK_TIMER_START              (timer, type, name)
#define             OSSO_ABOOK_TIMER_MARK               (timer)
#define             OSSO_ABOOK_LOCAL_TIMER_START        (type, name)
#define             OSSO_ABOOK_LOCAL_TIMER_END          ()
#define             OSSO_ABOOK_NOTE                     (type,format,...)
#define             OSSO_ABOOK_MARK                     (type)
#define             OSSO_ABOOK_DUMP_VCARD               (type,contact,note)
#define             OSSO_ABOOK_DUMP_VCARD_STRING        (type,vcs,note)
#define             OSSO_ABOOK_DEBUG_FLAGS              (type)

Description

This module provides debugging facilities for printing debug messages and measuring duration of operations.

Those facilities are deactivated unless the --enable-debug switch was passed to the configure script.

Use the OSSO_ABOOK_DEBUG environment variable to control which messages are shown: Setting OSSO_ABOOK_DEBUG to "eds startup" limits debugging to Evolution-Data-Server and startup related code. Leaving that variable empty or specifying "none" disables all debug messages. See OssoABookDebugFlags for some complete list of valid flags. The file /etc/osso-af-init/osso-gtk.defs is a good place for globally initializing OSSO_ABOOK_DEBUG.

Details

enum OssoABookDebugFlags

typedef enum {
        OSSO_ABOOK_DEBUG_NONE           =  0,
        OSSO_ABOOK_DEBUG_EDS            = (1 << 0),
        OSSO_ABOOK_DEBUG_GTK            = (1 << 1),
        OSSO_ABOOK_DEBUG_HILDON         = (1 << 2),
        OSSO_ABOOK_DEBUG_CONTACT_ADD    = (1 << 3),
        OSSO_ABOOK_DEBUG_CONTACT_REMOVE = (1 << 4),
        OSSO_ABOOK_DEBUG_CONTACT_UPDATE = (1 << 5),
        OSSO_ABOOK_DEBUG_VCARD          = (1 << 6),
        OSSO_ABOOK_DEBUG_AVATAR         = (1 << 7),
        OSSO_ABOOK_DEBUG_MC             = (1 << 8),
        OSSO_ABOOK_DEBUG_CAPS           = (1 << 9),
        OSSO_ABOOK_DEBUG_GENERIC        = (1 << 10),
        OSSO_ABOOK_DEBUG_LIST_STORE     = (1 << 11),
        OSSO_ABOOK_DEBUG_STARTUP        = (1 << 12),
        OSSO_ABOOK_DEBUG_DBUS           = (1 << 13),
        OSSO_ABOOK_DEBUG_AGGREGATOR     = (1 << 14),
        OSSO_ABOOK_DEBUG_I18N           = (1 << 15),
        OSSO_ABOOK_DEBUG_SIM            = (1 << 16),
        OSSO_ABOOK_DEBUG_EDITOR         = (1 << 17),
        OSSO_ABOOK_DEBUG_TREE_VIEW      = (1 << 29),
        OSSO_ABOOK_DEBUG_DISK_SPACE     = (1 << 30),
        OSSO_ABOOK_DEBUG_TODO           = (1 << 31),
        OSSO_ABOOK_DEBUG_ALL            = ~0,
} OssoABookDebugFlags;

This flags describe the various debugging domains of libosso-abook.

OSSO_ABOOK_DEBUG_NONE show no debugging messages
OSSO_ABOOK_DEBUG_EDS trace Evolution Data Server related behavior
OSSO_ABOOK_DEBUG_GTK trace GTK+ related behavior
OSSO_ABOOK_DEBUG_HILDON trace Hildon related behavior
OSSO_ABOOK_DEBUG_CONTACT_ADD trace contact additions
OSSO_ABOOK_DEBUG_CONTACT_REMOVE trace contact removals
OSSO_ABOOK_DEBUG_CONTACT_UPDATE trace contact updates
OSSO_ABOOK_DEBUG_VCARD trace vCard parsing related behavior
OSSO_ABOOK_DEBUG_AVATAR trace OssoABookAvatar related behavior
OSSO_ABOOK_DEBUG_MC trace Mission Control related behavior
OSSO_ABOOK_DEBUG_CAPS trace OssoABookCaps related behavior
OSSO_ABOOK_DEBUG_GENERIC trace generic behavior
OSSO_ABOOK_DEBUG_LIST_STORE trace OssoABookListStore related behavior
OSSO_ABOOK_DEBUG_STARTUP trace startup behavior
OSSO_ABOOK_DEBUG_DBUS trace D-Bus related behavior
OSSO_ABOOK_DEBUG_AGGREGATOR trace OssoABookAggregator related behavior
OSSO_ABOOK_DEBUG_I18N trace localization related behavior
OSSO_ABOOK_DEBUG_SIM trace sim-card related behavior
OSSO_ABOOK_DEBUG_EDITOR trace OssoABookContactEditor related behavior
OSSO_ABOOK_DEBUG_TREE_VIEW trace OssoABookTreeView related behavior
OSSO_ABOOK_DEBUG_DISK_SPACE assume that no disk space is available
OSSO_ABOOK_DEBUG_TODO show TODO notes
OSSO_ABOOK_DEBUG_ALL show all debugging messages

osso_abook_debug_init ()

void                osso_abook_debug_init               (void);

Initializes the debugging framework of libosso-abook.


osso_abook_debug_write_pixbuf ()

gboolean            osso_abook_debug_write_pixbuf       (GdkPixbuf *pixbuf,
                                                         const char *filename,
                                                         OssoABookContact *contact);

osso_abook_debug_write_pixbuf_prefix ()

gboolean            osso_abook_debug_write_pixbuf_prefix
                                                        (GdkPixbuf *pixbuf,
                                                         const char *filename_prefix,
                                                         OssoABookContact *contact);

OSSO_ABOOK_TIMER_START()

#define             OSSO_ABOOK_TIMER_START(timer, type, name)

Initializes a GTimer object for debugging when the debugging flag described by type is set. Assigns name for later reference, or G_STRFUNC when name is NULL.

timer : a GTimer, or NULL
type : the required debugging flag, see OssoABookDebugFlags
name : the name of the timer, or NULL

OSSO_ABOOK_TIMER_MARK()

#define             OSSO_ABOOK_TIMER_MARK(timer)

Prints the current timestamp of timer when the debugging flag specified with OSSO_ABOOK_TIMER_START() is set.

timer : a GTimer, or NULL

OSSO_ABOOK_LOCAL_TIMER_START()

#define             OSSO_ABOOK_LOCAL_TIMER_START(type, name)

Initializes a local timer object for debugging when the debugging flag described by type is set. Assigns name for later reference, or G_STRFUNC when name is NULL.

Requires a matching OSSO_ABOOK_LOCAL_TIMER_END() call within the same scope.

type : the required debugging flag, see OssoABookDebugFlags
name : the name of the timer, or NULL

OSSO_ABOOK_LOCAL_TIMER_END()

#define             OSSO_ABOOK_LOCAL_TIMER_END()

Destroys a local timer created with OSSO_ABOOK_LOCAL_TIMER_START().


OSSO_ABOOK_NOTE()

#define             OSSO_ABOOK_NOTE(type,format,...)

Prints a debug message when the debug flags cover type.

type : the required debugging flag, see OssoABookDebugFlags
format : a standard printf() format string
... : the arguments to insert in the output

OSSO_ABOOK_MARK()

#define             OSSO_ABOOK_MARK(type)

Prints a debugging marker when the debug flags cover type.

type : the required debugging flag, see OssoABookDebugFlags

OSSO_ABOOK_DUMP_VCARD()

#define             OSSO_ABOOK_DUMP_VCARD(type,contact,note)

OSSO_ABOOK_DUMP_VCARD_STRING()

#define             OSSO_ABOOK_DUMP_VCARD_STRING(type,vcs,note)

OSSO_ABOOK_DEBUG_FLAGS()

#define             OSSO_ABOOK_DEBUG_FLAGS(type)

Checks whether the debug flags cover type.

type : the required debugging flag, see OssoABookDebugFlags