"Fossies" - the Fresh Open Source Software Archive

Member "logrotate-3.18.1/log.h" (21 May 2021, 602 Bytes) of package /linux/privat/logrotate-3.18.1.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "log.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 3.18.0_vs_3.18.1.

    1 #ifndef H_LOG
    2 #define H_LOG
    3 
    4 #include <stdio.h>
    5 
    6 #define MESS_REALDEBUG  1
    7 #define MESS_DEBUG      2
    8 #define MESS_VERBOSE    3
    9 #define MESS_NORMAL     4
   10 #define MESS_ERROR      5
   11 #define MESS_FATAL      6
   12 
   13 void message(int level, const char *format, ...)
   14 #ifdef __GNUC__
   15     __attribute__ ((format(printf, 2, 3)));
   16 #else
   17 ;
   18 #endif
   19 
   20 #define message_OOM() \
   21     do { \
   22         message(MESS_ERROR, "cannot allocate memory [%s():%d]\n", __func__, __LINE__); \
   23     } while(0)
   24 
   25 void logSetMessageFile(FILE * f);
   26 void logToSyslog(int enable);
   27 void logSetLevel(int level);
   28 
   29 #endif
   30 
   31 /* vim: set et sw=4 ts=4: */