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