-/**
- * This function should be used as central logging facility.
- * 'type' argument should be one of following:
- *
- * LOG_EMERG system is unusable
- * LOG_ALERT action must be taken immediately
- * LOG_CRIT critical conditions
- * LOG_ERR error conditions
- * LOG_WARNING warning conditions
- * LOG_NOTICE normal but significant condition
- * LOG_INFO informational
- * LOG_DEBUG debug-level messages
- */
-static void log(int type, char *format, ...)
-{
- va_list ap;
-
-#ifndef DEBUG
- if(type==LOG_DEBUG)
- return;
-#endif
-
- va_start(ap, format);
-
- fprintf(stderr, "icmpmonitor[%d]:", (int)getpid());
- vfprintf(stderr, format, ap);
- fprintf(stderr, "\n");
- va_end(ap);
-}
-