Error logging

Error logging — Hooks for defining your own log-handling functions

Synopsis




struct      IptcLog;
IptcLog*    iptc_log_new                    (void);
IptcLog*    iptc_log_new_mem                (IptcMem*);
void        iptc_log_ref                    (IptcLog *log);
void        iptc_log_unref                  (IptcLog *log);
void        iptc_log_free                   (IptcLog *log);
enum        IptcLogCode;
const char* iptc_log_code_get_title         (IptcLogCode);
const char* iptc_log_code_get_message       (IptcLogCode);
void        (*IptcLogFunc)                  (IptcLog *log,
                                             IptcLogCode,
                                             const char *domain,
                                             const char *format,
                                             va_list args,
                                             void *data);
void        iptc_log_set_func               (IptcLog *log,
                                             IptcLogFunc func,
                                             void *data);
void        iptc_log                        (IptcLog *log,
                                             IptcLogCode,
                                             const char *domain,
                                             const char *format);
#define     IPTC_LOG_NO_MEMORY              (l,d,s)

Description

Details

struct IptcLog

struct IptcLog;


iptc_log_new ()

IptcLog*    iptc_log_new                    (void);

Returns :

iptc_log_new_mem ()

IptcLog*    iptc_log_new_mem                (IptcMem*);

Param1 :
Returns :

iptc_log_ref ()

void        iptc_log_ref                    (IptcLog *log);

log :

iptc_log_unref ()

void        iptc_log_unref                  (IptcLog *log);

log :

iptc_log_free ()

void        iptc_log_free                   (IptcLog *log);

log :

enum IptcLogCode

typedef enum {
	IPTC_LOG_CODE_NONE,
	IPTC_LOG_CODE_DEBUG,
	IPTC_LOG_CODE_NO_MEMORY,
	IPTC_LOG_CODE_CORRUPT_DATA
} IptcLogCode;


iptc_log_code_get_title ()

const char* iptc_log_code_get_title         (IptcLogCode);

Param1 :
Returns :

iptc_log_code_get_message ()

const char* iptc_log_code_get_message       (IptcLogCode);

Param1 :
Returns :

IptcLogFunc ()

void        (*IptcLogFunc)                  (IptcLog *log,
                                             IptcLogCode,
                                             const char *domain,
                                             const char *format,
                                             va_list args,
                                             void *data);

log :
Param2 :
domain :
format :
args :
data :

iptc_log_set_func ()

void        iptc_log_set_func               (IptcLog *log,
                                             IptcLogFunc func,
                                             void *data);

log :
func :
data :

iptc_log ()

void        iptc_log                        (IptcLog *log,
                                             IptcLogCode,
                                             const char *domain,
                                             const char *format);

log :
Param2 :
domain :
format :

IPTC_LOG_NO_MEMORY()

#define IPTC_LOG_NO_MEMORY(l,d,s) iptc_log (l, IPTC_LOG_CODE_NO_MEMORY, d, "Could not allocate %i byte(s).", s)

l :
d :
s :