prelude-log

Name

prelude-log -- 

Synopsis



void        prelude_log_use_syslog          (void);
char*       prelude_log_get_prefix          (void);
void        prelude_log_set_prefix          (char *prefix);
void        prelude_log                     (int priority,
                                             const char *file,
                                             const char *function,
                                             int line,
                                             const char *fmt,
                                             ...);
#define     log                             (priority, args...)
#define     do_init                         (func, name)
#define     do_init_nofail                  (func, name)

Description

Details

prelude_log_use_syslog ()

void        prelude_log_use_syslog          (void);

Tell the Prelude standard logger to log throught syslog. (this is usefull in case the program using the log function is a daemon).


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 ()

void        prelude_log                     (int priority,
                                             const char *file,
                                             const char *function,
                                             int line,
                                             const char *fmt,
                                             ...);

This function should not be called directly. Use the log macro defined in prelude-log.h

priority :

LOG_INFO or LOG_ERR.

file :

The caller filename.

function :

The caller function name.

line :

The caller line number.

fmt :

Format string.

... :

Variable argument list.


log()

#define     log(priority, args...)

priority :

args... :


do_init()

#define     do_init(func, name)

func :

name :


do_init_nofail()

#define     do_init_nofail(func, name)

func :

name :