/* Enumeration of log levels */
enum pdf_log_level_e {
PDF_LOG_LEVEL_DEBUG = 0,
PDF_LOG_LEVEL_INFO = 1,
PDF_LOG_LEVEL_WARNING = 2,
PDF_LOG_LEVEL_ERROR = 3,
PDF_LOG_LEVEL_NONE = 4
};
I would not use several log levels. The library is not expected to
emit traces except for debugging purposes or to notify fatal errors.
/* Main logging function */
void pdf_log(enum pdf_log_level_e log_level,
enum pdf_log_type_e log_type,
const char *str_template,
...);
I like gerel's proposal to use a conditional macro `PDF_DEBUG' (or a
set of macros `PDF_DEBUG_*' if we implement several logging scopes)
that may expand to the empty string.