libfuncs is collection of code (list, queue, circular buffer, io, logging, etc.). https://georgi.unixsol.org/programs/libfuncs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

log.h 766B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * IPTV.bg Media Proxy
  3. * LOG functions header file
  4. *
  5. * Copyright (C) 2006 Unix Solutions Ltd.
  6. * Written by Luben Karavelov (luben@unixsol.org)
  7. *
  8. */
  9. #ifndef LOG_H
  10. # define LOG_H
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #include <stdio.h>
  15. void log_init (char *host_ident, int use_syslog, int use_stderr, char *log_host, int log_port);
  16. void log_close ();
  17. void LOG (const char *msg);
  18. __attribute__ ((format(printf, 1, 2)))
  19. void LOGf(const char *fmt, ...);
  20. void log_perror(const char *message, int _errno);
  21. void log_set_out_fd(FILE *new_out_fd);
  22. #ifdef DEBUG
  23. #define dbg_LOG LOG
  24. #define dbg_LOGf LOGf
  25. #else
  26. #define dbg_LOG(arg) do { /* arg */ } while(0)
  27. #define dbg_LOGf(...) do { /* ... */ } while(0)
  28. #endif
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif