log.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _LOG_H
  2. #define _LOG_H
  3. #define LOGLINEMAX 867
  4. #define LOGLINELEN LOGLINEMAX + 1
  5. /* Logfile display flags
  6. */
  7. #define LOG_MSGS BIT0 /* m msgs/notice/ctcps */
  8. #define LOG_PUBLIC BIT1 /* p public msg/notice/ctcps */
  9. #define LOG_JOIN BIT2 /* j channel joins/parts/etc */
  10. #define LOG_MODES BIT3 /* k mode changes/kicks/bans */
  11. #define LOG_CMDS BIT4 /* c user dcc or msg commands */
  12. #define LOG_MISC BIT5 /* o other misc bot things */
  13. #define LOG_BOTS BIT6 /* b bot notices */
  14. #define LOG_RAW BIT7 /* r raw server stuff coming in */
  15. #define LOG_FILES BIT8 /* x file transfer commands and stats */
  16. #define LOG_ERRORS BIT9 /* e misc errors */
  17. #define LOG_ERROR LOG_ERRORS
  18. #define LOG_GETIN BIT10 /* g op system. (Getin) */
  19. #define LOG_WARN BIT11 /* u warnings */
  20. #define LOG_WARNING LOG_WARN
  21. #define LOG_SERV BIT17 /* s server information */
  22. #define LOG_DEBUG BIT18 /* d debug */
  23. #define LOG_WALL BIT19 /* w wallops */
  24. #define LOG_SRVOUT BIT20 /* v server output */
  25. #define LOG_BOTNET BIT21 /* t botnet traffic */
  26. #define LOG_BOTSHARE BIT22 /* h share traffic */
  27. #define LOG_ALL 0xfffffff /* (dump to all logfiles) */
  28. void logidx(int, const char *, ...) __attribute__((format(printf, 2, 3)));
  29. void putlog (int, const char *, const char *, ...) __attribute__((format(printf, 3, 4)));
  30. int logmodes(const char *);
  31. char *masktype(int);
  32. char *maskname(int);
  33. void irc_log(struct chanset_t *, const char *, ...) __attribute__((format(printf, 2, 3)));
  34. extern int conmask;
  35. extern bool debug_output, use_console_r;
  36. #endif /* !_LOG_H */