syslog.c 831 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * <syslog.h> wrapper functions.
  3. *
  4. * Authors:
  5. * Jonathan Pryor ([email protected])
  6. *
  7. * Copyright (C) 2005 Jonathan Pryor
  8. */
  9. #include <stdarg.h>
  10. #include <syslog.h>
  11. #include <errno.h>
  12. #include "map.h"
  13. #include "mph.h"
  14. #include <glib.h>
  15. G_BEGIN_DECLS
  16. int
  17. Mono_Posix_Syscall_openlog (void* ident, int option, int facility)
  18. {
  19. openlog ((const char*) ident, option, facility);
  20. return 0;
  21. }
  22. int
  23. Mono_Posix_Syscall_closelog (void)
  24. {
  25. closelog ();
  26. return 0;
  27. }
  28. int
  29. Mono_Posix_Syscall_syslog (int priority, const char* message)
  30. {
  31. syslog (priority, message);
  32. return 0;
  33. }
  34. /* vararg version of syslog(3). */
  35. gint32
  36. Mono_Posix_Syscall_syslog2 (int priority, const char *format, ...)
  37. {
  38. va_list ap;
  39. va_start (ap, format);
  40. vsyslog (priority, format, ap);
  41. va_end (ap);
  42. return 0;
  43. }
  44. G_END_DECLS
  45. /*
  46. * vim: noexpandtab
  47. */