src/lib/log.h
changeset 27 461be4cd34a3
parent 24 82cfdb6680d1
child 28 e944453ca924
equal deleted inserted replaced
26:61668c57f4bb 27:461be4cd34a3
    10     LOG_DISPLAY_STDERR =    0x01,
    10     LOG_DISPLAY_STDERR =    0x01,
    11 
    11 
    12     LOG_DISPLAY_PERR =      0x02,
    12     LOG_DISPLAY_PERR =      0x02,
    13 
    13 
    14     LOG_DISPLAY_NONL =      0x04,
    14     LOG_DISPLAY_NONL =      0x04,
       
    15 
       
    16     LOG_DISPLAY_FATAL =     0x08,
    15 };
    17 };
    16 
    18 
    17 
    19 
    18 void _generic_err (int flags, const char *func, int err, const char *fmt, ...)
    20 void _generic_err (int flags, const char *func, int err, const char *fmt, ...)
    19         __attribute__ ((format (printf, 4, 5)));
    21         __attribute__ ((format (printf, 4, 5)));
    51 
    53 
    52 // logging includes errors
    54 // logging includes errors
    53 #include "error.h"
    55 #include "error.h"
    54 
    56 
    55 #define WARNING(...) err_func(__func__, __VA_ARGS__)
    57 #define WARNING(...) err_func(__func__, __VA_ARGS__)
       
    58 #define NWARNING(...) err_func_nonl(__func__, __VA_ARGS__)
    56 #define PWARNING(...) perr_func(__func__, __VA_ARGS__)
    59 #define PWARNING(...) perr_func(__func__, __VA_ARGS__)
    57 #define EWARNING(err, ...) eerr_func(__func__, (err), __VA_ARGS__)
    60 #define EWARNING(err, ...) eerr_func(__func__, (err), __VA_ARGS__)
    58 
    61 
    59 #ifdef DEBUG_ENABLED
    62 #ifdef DEBUG_ENABLED
    60 #define DEBUG(...) debug(__func__, __VA_ARGS__)
    63 #define DEBUG(...) debug(__func__, __VA_ARGS__)