25 #ifndef COMPS_LOGGER_H
26 #define COMPS_LOGGER_H
28 #include "comps_elem.h"
29 #include "comps_types.h"
31 typedef enum {COMPS_LOG_INFO, COMPS_LOG_ERROR,
32 COMPS_LOG_WARNING} COMPS_LogEntryType;
56 typedef struct __COMPS_LoggerMsg {
80 typedef enum {COMPS_ERR_NO_ERR,
81 COMPS_ERR_ELEM_UNKNOWN,
82 COMPS_ERR_ELEM_ALREADYSET,
84 COMPS_ERR_DEFAULT_PARAM,
85 COMPS_ERR_USERVISIBLE_PARAM,
86 COMPS_ERR_PACKAGE_UNKNOWN,
87 COMPS_ERR_DEFAULT_MISSING,
88 COMPS_ERR_USERVISIBLE_MISSING,
89 COMPS_ERR_NAME_MISSING,
91 COMPS_ERR_DESC_MISSING,
92 COMPS_ERR_GROUPIDS_EMPTY,
94 COMPS_ERR_DTD_SEQUENCE,
96 COMPS_ERR_DTD_NOCHILD,
102 COMPS_ERR_GROUPLIST_NOTSET,
103 COMPS_ERR_OPTIONLIST_NOTSET,
104 COMPS_ERR_ELEM_REQUIRED,
105 COMPS_ERR_LIST_EMPTY,
106 COMPS_ERR_TEXT_BETWEEN,
107 COMPS_ERR_NOCONTENT} COMPS_LogErrCode;
113 COMPS_LogErrCode code,
unsigned int optcode1,
114 unsigned int optcode2,
unsigned int optcode3);
117 COMPS_LogErrCode code,
unsigned int optcode1,
118 unsigned int optcode2,
unsigned int optcode3);
120 COMPS_LogErrCode code,
unsigned int optcode1,
121 unsigned int optcode2,
unsigned int optcode3);
123 COMPS_LogErrCode code,
unsigned int optcode1,
124 unsigned int optcode2,
unsigned int optcode3);
126 void comps_log_entry_destroy_v(
void *entry);
char * log_message
Definition: comps_logger.h:41
COMPS_List * logger_data
Definition: comps_logger.h:75
void comps_log_destroy(COMPS_Logger *log)
Definition: comps_logger.c:114
void comps_log_error(COMPS_Logger *logger, const char *msg, COMPS_LogErrCode code, unsigned int optcode1, unsigned int optcode2, unsigned int optcode3)
Definition: comps_logger.c:305
void comps_log_info(COMPS_Logger *logger, const char *msg, COMPS_LogErrCode code, unsigned int optcode1, unsigned int optcode2, unsigned int optcode3)
Definition: comps_logger.c:357
COMPS_Logger * comps_log_create(unsigned redirect2out)
Definition: comps_logger.c:98
char * comps_log_entry_str(COMPS_LoggerEntry *entry)
Definition: comps_logger.c:178
unsigned redirect2output
Definition: comps_logger.h:77
Definition: comps_list.h:76
unsigned int opt_code1
Definition: comps_logger.h:45
A Documented file. Details.
Definition: comps_logger.h:73
char * comps_log_str(COMPS_Logger *logger)
Definition: comps_logger.c:375
unsigned int code
Definition: comps_logger.h:43
Definition: comps_logger.h:39
COMPS_LoggerEntry * comps_log_entry_create(const char *msg, unsigned type, COMPS_LogErrCode code, unsigned int optcode1, unsigned int optcode2, unsigned int optcode3)
Definition: comps_logger.c:137
unsigned int opt_code3
Definition: comps_logger.h:49
unsigned int opt_code2
Definition: comps_logger.h:47
void comps_log_warning(COMPS_Logger *logger, const char *msg, COMPS_LogErrCode code, unsigned int optcode1, unsigned int optcode2, unsigned int optcode3)
Definition: comps_logger.c:333
unsigned type
Definition: comps_logger.h:51