vlog: abstract out interface to syslog daemon
authorAnsis Atteka <aatteka@nicira.com>
Sun, 14 Jun 2015 00:22:15 +0000 (17:22 -0700)
committerAnsis Atteka <aatteka@nicira.com>
Sat, 27 Jun 2015 19:59:16 +0000 (12:59 -0700)
commitee7409a665510e762a58914f5990406f542c85b2
tree308a2d3c712a5e1815d97f69394df583d4e2c296
parent5488d16df5d1e619a9a8fa6e967bd25bb331f6ee
vlog: abstract out interface to syslog daemon

This patch helps to address two issues that are present on Ubuntu
15.04 (and most likely other Linux distributions) where rsyslog daemon
is configured to relay log messages from OVS to a remote log collector
and syslog format being used is something other than the one defined in
RFC 3164.  These two issues are:

1. libc syslog() function always adds RFC 3164 prefix to syslog
   messages before sending them over /dev/log Unix domain socket.
   This does not allow us to use libc syslog() function to log in
   RFC 5424 format;  and

2. rsyslogd daemon that comes with Ubuntu 15.04 is too old and
   uses hardcoded syslog message parser when it received messages
   over /dev/log UNIX domain socket.

Solution to those two issues would be to use the newly introduced
--syslog-method=udp:127.0.0.1:514 command line argument when starting
OVS.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Conflicts:
NEWS
NEWS
include/openvswitch/vlog.h
lib/automake.mk
lib/syslog-direct.c [new file with mode: 0644]
lib/syslog-direct.h [new file with mode: 0644]
lib/syslog-libc.c [new file with mode: 0644]
lib/syslog-libc.h [new file with mode: 0644]
lib/syslog-provider.h [new file with mode: 0644]
lib/vlog.c
lib/vlog.man