ovs-external-ids was crashing on startup because it was brought up
before /dev/log exists. The simplest solution to this problem is
to have it log to /var/log/openvswitch/ovs-external-ids.log . This
is consistent with vswitchd and ovsdb-server.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
import ovs.db.idl
s_log = logging.getLogger("ovs-external-ids")
-l_handler = logging.handlers.SysLogHandler(
- "/dev/log",
- facility=logging.handlers.SysLogHandler.LOG_DAEMON)
+l_handler = logging.handlers.RotatingFileHandler(
+ "/var/log/openvswitch/ovs-external-ids.log")
l_formatter = logging.Formatter('%(filename)s: %(levelname)s: %(message)s')
l_handler.setFormatter(l_formatter)
s_log.addHandler(l_handler)
+s_log.setLevel(logging.INFO)
vsctl="/usr/bin/ovs-vsctl"
session = None