log.h 495 B

123456789101112131415161718192021222324252627
  1. #ifndef H_LOG
  2. #define H_LOG
  3. #include <stdio.h>
  4. #define MESS_REALDEBUG 1
  5. #define MESS_DEBUG 2
  6. #define MESS_VERBOSE 3
  7. #define MESS_NORMAL 4
  8. #define MESS_ERROR 5
  9. #define MESS_FATAL 6
  10. #define LOG_TIMES (1 << 0)
  11. void message(int level, const char *format, ...)
  12. #ifdef __GNUC__
  13. __attribute__ ((format(printf, 2, 3)));
  14. #else
  15. ;
  16. #endif
  17. void logSetMessageFile(FILE * f);
  18. void logToSyslog(int enable);
  19. void logSetLevel(int level);
  20. #endif
  21. /* vim: set et sw=4 ts=4: */