syslog: Provide stub functions for openlog and syslog.
authorGurucharan Shetty <gshetty@nicira.com>
Mon, 6 Jan 2014 21:54:21 +0000 (13:54 -0800)
committerGurucharan Shetty <gshetty@nicira.com>
Fri, 24 Jan 2014 15:59:02 +0000 (07:59 -0800)
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@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
include/windows/syslog.h
lib/vlog-unixctl.man
lib/vlog.man
utilities/ovs-appctl.8.in

index 4a2f38b..41267da 100644 (file)
 #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 */
index 4ead3e2..1890dc2 100644 (file)
@@ -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
index f675a4b..2ccef7f 100644 (file)
@@ -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
index e381b2b..cfb74eb 100644 (file)
@@ -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