From 5a6af13f9645865b21c144a5a46aed79f8d8f2e5 Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Mon, 6 Jan 2014 13:54:21 -0800 Subject: [PATCH] syslog: Provide stub functions for openlog and syslog. One option to implement openlog and syslog functionality in Windows is to use windows event logger. But it looks like it involves changing registry settings and in general looks complicated. For the time being, do nothing for syslog. All the information needed for debugging will be present through the 'file' option anyways. We can start OVS daemons on Windows with "-vfile:info -vsyslog:off". Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- include/windows/syslog.h | 11 +++++++++++ lib/vlog-unixctl.man | 4 ++++ lib/vlog.man | 4 ++++ utilities/ovs-appctl.8.in | 4 ++++ 4 files changed, 23 insertions(+) diff --git a/include/windows/syslog.h b/include/windows/syslog.h index 4a2f38b6e..41267da1c 100644 --- a/include/windows/syslog.h +++ b/include/windows/syslog.h @@ -37,4 +37,15 @@ #define LOG_LOCAL6 (22<<3) /* reserved for local use */ #define LOG_LOCAL7 (23<<3) /* reserved for local use */ +static inline void +openlog(const char *ident OVS_UNUSED, int option OVS_UNUSED, + int facility OVS_UNUSED) +{ +} + +static inline void +syslog(int priority OVS_UNUSED, const char *format OVS_UNUSED, ...) +{ +} + #endif /* syslog.h */ diff --git a/lib/vlog-unixctl.man b/lib/vlog-unixctl.man index 4ead3e21c..1890dc2fc 100644 --- a/lib/vlog-unixctl.man +++ b/lib/vlog-unixctl.man @@ -21,6 +21,10 @@ module. \fBsyslog\fR, \fBconsole\fR, or \fBfile\fR, to limit the log level change to only to the system log, to the console, or to a file, respectively. +.IP +On Windows platform, \fBsyslog\fR is accepted as a word and is only +useful along with the \fB\-\-syslog\-target\fR option (the word has no +effect otherwise). . .IP \(bu \fBoff\fR, \fBemer\fR, \fBerr\fR, \fBwarn\fR, \fBinfo\fR, or diff --git a/lib/vlog.man b/lib/vlog.man index f675a4b3e..2ccef7ffe 100644 --- a/lib/vlog.man +++ b/lib/vlog.man @@ -21,6 +21,10 @@ module. \fBsyslog\fR, \fBconsole\fR, or \fBfile\fR, to limit the log level change to only to the system log, to the console, or to a file, respectively. +.IP +On Windows platform, \fBsyslog\fR is accepted as a word and is only +useful along with the \fB\-\-syslog\-target\fR option (the word has no +effect otherwise). . .IP \(bu \fBoff\fR, \fBemer\fR, \fBerr\fR, \fBwarn\fR, \fBinfo\fR, or diff --git a/utilities/ovs-appctl.8.in b/utilities/ovs-appctl.8.in index e381b2b4d..cfb74ebfb 100644 --- a/utilities/ovs-appctl.8.in +++ b/utilities/ovs-appctl.8.in @@ -119,6 +119,10 @@ module. \fBsyslog\fR, \fBconsole\fR, or \fBfile\fR, to limit the log level change to only to the system log, to the console, or to a file, respectively. +.IP +On Windows platform, \fBsyslog\fR is accepted as a word and +is only useful if the \fItarget\fR was started with the +\fB\-\-syslog\-target\fR option (the word has no effect otherwise). . .IP \(bu \fBoff\fR, \fBemer\fR, \fBerr\fR, \fBwarn\fR, \fBinfo\fR, or -- 2.43.0