mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
40 lines
908 B
Plaintext
40 lines
908 B
Plaintext
diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/keymgrd/skip_log.C work.new/skip/keymgrd/skip_log.C
|
|
--- skipsrc-1.0.orig/skip/keymgrd/skip_log.C Fri Oct 25 13:12:50 1996
|
|
+++ work.new/skip/keymgrd/skip_log.C Mon Jan 24 12:35:40 2000
|
|
@@ -60,7 +60,7 @@
|
|
strcpy(outbuf,buf);
|
|
}
|
|
|
|
-FILE *skip_log_fp = NULL;
|
|
+int skip_log_syslog = 0;
|
|
|
|
void skip_log(int severity, char *control,...)
|
|
{
|
|
@@ -71,15 +71,15 @@
|
|
get_time(buf);
|
|
va_start(va,control);
|
|
|
|
- if (skip_log_fp)
|
|
- out = skip_log_fp;
|
|
- else if (severity == SKIP_NOTICE)
|
|
- out=stdout;
|
|
- else
|
|
- out=stderr;
|
|
-
|
|
- fprintf(out,"%s",buf);
|
|
- vfprintf(out, control,va);
|
|
- fprintf(out,"\n");
|
|
- fflush(out);
|
|
+ if (skip_log_syslog) {
|
|
+ vsyslog(severity, control, va);
|
|
+ } else {
|
|
+ out = (severity == SKIP_NOTICE) ? stdout : stderr;
|
|
+ fprintf(out, "%s",buf);
|
|
+ vfprintf(out, control, va);
|
|
+ fprintf(out, "\n");
|
|
+ fflush(out);
|
|
+ }
|
|
+ va_end(va);
|
|
}
|
|
+
|