Error logging

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

Synopsis

                    IptcLog;
IptcLog *           iptc_log_new                        (void);
IptcLog *           iptc_log_new_mem                    (IptcMem *Param1);
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 Param1);
const char *        iptc_log_code_get_message           (IptcLogCode Param1);
void                (*IptcLogFunc)                      (IptcLog *log,
                                                         IptcLogCode Param2,
                                                         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 Param2,
                                                         const char *domain,
                                                         const char *format);
#define             IPTC_LOG_NO_MEMORY                  (l,
                                                         d,
                                                         s)

Description

Details

IptcLog

typedef struct _IptcLog IptcLog;


iptc_log_new ()

IptcLog *           iptc_log_new                        (void);


iptc_log_new_mem ()

IptcLog *           iptc_log_new_mem                    (IptcMem *Param1);


iptc_log_ref ()

void                iptc_log_ref                        (IptcLog *log);


iptc_log_unref ()

void                iptc_log_unref                      (IptcLog *log);


iptc_log_free ()

void                iptc_log_free                       (IptcLog *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);


iptc_log_code_get_message ()

const char *        iptc_log_code_get_message           (IptcLogCode Param1);


IptcLogFunc ()

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


iptc_log_set_func ()

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


iptc_log ()

void                iptc_log                            (IptcLog *log,
                                                         IptcLogCode Param2,
                                                         const char *domain,
                                                         const char *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)