## camel-debug camel-debug |

## Synopsis

    #define             CAMEL_DEBUG_IMAP
    #define             CAMEL_DEBUG_IMAP_FOLDER
    void                camel_debug_init                    (void);
    gboolean            camel_debug                         (const gchar *mode);
    gboolean            camel_debug_start                   (const gchar *mode);
    void                camel_debug_end                     (void);
    #define             CAMEL_CHECK_GERROR                  (object,
                                                             method,
                                                             expr,
                                                             error)

## Description

## Details

### CAMEL_DEBUG_IMAP

    #define CAMEL_DEBUG_IMAP "imap"

### CAMEL_DEBUG_IMAP_FOLDER

    #define CAMEL_DEBUG_IMAP_FOLDER "imap:folder"

### camel_debug_init ()

    void                camel_debug_init                    (void);

Init camel debug.

CAMEL_DEBUG is set to a comma separated list of modules to debug. The modules can contain module-specific specifiers after a ':', or just act as a wildcard for the module or even specifier. e.g. 'imap' for imap debug, or 'imap:folder' for imap folder debug. Additionaly, ':folder' can be used for a wildcard for any folder operations.

### camel_debug ()

    gboolean            camel_debug                         (const gchar *mode);

Check to see if a debug mode is activated. `mode` takes one of two forms, a fully qualified 'module:target', or a wildcard 'module' name. It returns a boolean to indicate if the module or module and target is currently activated for debug output.

### camel_debug_start ()

    gboolean            camel_debug_start                   (const gchar *mode);

Start debug output for a given mode, used to make sure debug output is output atomically and not interspersed with unrelated stuff.

Returns : | Returns true if mode is set, and in which case, you must call debug_end when finished any screen output.

### camel_debug_end ()

    void                camel_debug_end                     (void);

Call this when you're done with your debug output. If and only if you called camel_debug_start, and if it returns TRUE.

### CAMEL_CHECK_GERROR()

    #define             CAMEL_CHECK_GERROR(object, method, expr, error)

This sanity checks return values and GErrors. If returning failure, make sure the GError is set. If returning success, make sure the GError is NOT set.

Example:

success = class->foo (object, some_data, error); CAMEL_CHECK_GERROR (object, foo, success, error); return success;

Since 2.32