logger
3
HAL Library

# logger

## Synopsis

    void        logger_setup                    (int priority,
                                                 const char *file,
                                                 int line,
                                                 const char *function);
    void        logger_emit                     (const char *format,
                                                 ...);
    void        logger_enable                   (void);
    void        logger_disable                  (void);
    void        logger_enable_syslog            (void);
    void        logger_disable_syslog           (void);
    #define     HAL_TRACE                       (expr)
    #define     HAL_DEBUG                       (expr)
    #define     HAL_INFO                        (expr)
    #define     HAL_WARNING                     (expr)
    #define     HAL_ERROR                       (expr)
    #define     DIE                             (expr)

## Description

## Details

### logger_setup ()

    void        logger_setup                    (int priority,
                                                 const char *file,
                                                 int line,
                                                 const char *function);

`priority` :

`file` :

`line` :

`function` :

### logger_emit ()

    void        logger_emit                     (const char *format,
                                                 ...);

`format` :

`...` :

### logger_enable ()

    void        logger_enable                   (void);

### logger_disable ()

    void        logger_disable                  (void);

### logger_enable_syslog ()

    void        logger_enable_syslog            (void);

### logger_disable_syslog ()

    void        logger_disable_syslog           (void);

### HAL_TRACE()

    #define HAL_TRACE(expr)   do {logger_setup(HAL_LOGPRI_TRACE,   __FILE__, __LINE__, __FUNCTION__); logger_emit expr; } while(0)

`expr` :

### HAL_DEBUG()

    #define HAL_DEBUG(expr)   do {logger_setup(HAL_LOGPRI_DEBUG,   __FILE__, __LINE__, __FUNCTION__); logger_emit expr; } while(0)

`expr` :

### HAL_INFO()

    #define HAL_INFO(expr)    do {logger_setup(HAL_LOGPRI_INFO,    __FILE__, __LINE__, __FUNCTION__); logger_emit expr; } while(0)

`expr` :

### HAL_WARNING()

    #define HAL_WARNING(expr) do {logger_setup(HAL_LOGPRI_WARNING, __FILE__, __LINE__, __FUNCTION__); logger_emit expr; } while(0)

`expr` :

### HAL_ERROR()

    #define HAL_ERROR(expr)   do {logger_setup(HAL_LOGPRI_ERROR,   __FILE__, __LINE__, __FUNCTION__); logger_emit expr; } while(0)

`expr` :

### DIE()

    #define     DIE(expr)

`expr` :