prelude-log

prelude-log

Synopsis

enum                prelude_log_t;
enum                prelude_log_flags_t;
void                prelude_log                         (prelude_log_t level,
                                                         const char *fmt,
                                                         ...);
void                prelude_log_debug                   (prelude_log_t level,
                                                         const char *fmt,
                                                         ...);
#define             prelude_log_v                       (level, fmt, ap)
#define             prelude_log_debug_v                 (level, fmt, ap)
void                prelude_log_set_level               (prelude_log_t level);
void                prelude_log_set_debug_level         (int level);
prelude_log_flags_t  prelude_log_get_flags              (void);
void                prelude_log_set_flags               (prelude_log_flags_t flags);
char *              prelude_log_get_prefix              (void);
void                prelude_log_set_prefix              (char *prefix);
void                prelude_log_set_callback            ();
int                 prelude_log_set_logfile             (const char *filename);

Description

Details

enum prelude_log_t

typedef enum {
        PRELUDE_LOG_CRIT  = -1,
        PRELUDE_LOG_ERR   =  0,
        PRELUDE_LOG_WARN  =  1,
        PRELUDE_LOG_INFO  =  2,
        PRELUDE_LOG_DEBUG  = 3
} prelude_log_t;


enum prelude_log_flags_t

typedef enum {
        PRELUDE_LOG_FLAGS_QUIET  = 0x01, /* Drop PRELUDE_LOG_PRIORITY_INFO */
        PRELUDE_LOG_FLAGS_SYSLOG = 0x02
} prelude_log_flags_t;


prelude_log ()

void                prelude_log                         (prelude_log_t level,
                                                         const char *fmt,
                                                         ...);

level :

fmt :

... :


prelude_log_debug ()

void                prelude_log_debug                   (prelude_log_t level,
                                                         const char *fmt,
                                                         ...);

level :

fmt :

... :


prelude_log_v()

#define             prelude_log_v(level, fmt, ap)

level :

fmt :

ap :


prelude_log_debug_v()

#define             prelude_log_debug_v(level, fmt, ap)

level :

fmt :

ap :


prelude_log_set_level ()

void                prelude_log_set_level               (prelude_log_t level);

level :


prelude_log_set_debug_level ()

void                prelude_log_set_debug_level         (int level);

level :


prelude_log_get_flags ()

prelude_log_flags_t  prelude_log_get_flags              (void);

Returns :


prelude_log_set_flags ()

void                prelude_log_set_flags               (prelude_log_flags_t flags);

flags :


prelude_log_get_prefix ()

char *              prelude_log_get_prefix              (void);

Returns :


prelude_log_set_prefix ()

void                prelude_log_set_prefix              (char *prefix);

Tell the Prelude standard logger to add prefix before logging a line.

prefix :

Pointer to the prefix to use.

prelude_log_set_callback ()

void                prelude_log_set_callback            ();

@log_cb() will be called in place of the prelude function usally used for loging.

log_cb :

Callback function.

prelude_log_set_logfile ()

int                 prelude_log_set_logfile             (const char *filename);

filename :

Returns :