[ovs-dev] [PATCH v2 2/2] syslog: Provide stub functions for openlog and syslog.

Gurucharan Shetty shettyg at nicira.com
Tue Jan 21 17:56:22 UTC 2014


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 <gshetty at nicira.com>
---
v1->v2:
    Add documentation.
---
 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 4a2f38b..41267da 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 4ead3e2..00910d3 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 f675a4b..9b7c05c 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 e381b2b..ef2ec08 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
-- 
1.7.9.5




More information about the dev mailing list