nagios.patch 650 B

123456789101112131415161718192021222324
  1. --- base/logging.c.orig Tue Feb 26 05:03:28 2002
  2. +++ base/logging.c Wed Jun 25 14:02:52 2003
  3. @@ -130,6 +130,7 @@
  4. /* write something to the syslog facility */
  5. int write_to_syslog(char *buffer, unsigned long data_type){
  6. +static int logopen = 0;
  7. #ifdef DEBUG0
  8. printf("write_to_syslog() start\n");
  9. @@ -142,6 +143,12 @@
  10. /* make sure we should log this type of entry */
  11. if(!(data_type & syslog_options))
  12. return OK;
  13. +
  14. + /* OSSP fsl identification */
  15. + if (!logopen) {
  16. + openlog("nagios", LOG_NDELAY, LOG_USER);
  17. + logopen = 1;
  18. + }
  19. /* write the buffer to the syslog facility */
  20. syslog(LOG_USER|LOG_INFO,"%s",buffer);