[node-patches] Change in ovirt-node[master]: If miss custom Syslog port, using default syslog port "514" ...
hadong0720 at gmail.com
hadong0720 at gmail.com
Wed Jun 4 10:27:43 UTC 2014
hadong has uploaded a new change for review.
Change subject: If miss custom Syslog port, using default syslog port "514" to set
......................................................................
If miss custom Syslog port, using default syslog port "514" to set
Change-Id: Id1eadbac0749d630f67a3bcd60f2f7791fffd5f2
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1100865
Signed-off-by: hadong <hadong at redhat.com>
---
M src/ovirtnode/log.py
1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/46/28346/1
diff --git a/src/ovirtnode/log.py b/src/ovirtnode/log.py
index 22c1124..0aee5f6 100755
--- a/src/ovirtnode/log.py
+++ b/src/ovirtnode/log.py
@@ -146,7 +146,7 @@
def syslog_auto():
host = ""
port = ""
- if (not "OVIRT_SYSLOG_SERVER" in _functions.OVIRT_VARS or
+ if (not "OVIRT_SYSLOG_SERVER" in _functions.OVIRT_VARS and
not "OVIRT_SYSLOG_PORT" in _functions.OVIRT_VARS):
logger.info("Attempting to locate remote syslog server...")
try:
@@ -160,6 +160,14 @@
else:
logger.warn("Syslog server not found!")
return False
+ elif ("OVIRT_SYSLOG_SERVER" in _functions.OVIRT_VARS and
+ not "OVIRT_SYSLOG_PORT" in _functions.OVIRT_VARS):
+ logger.info("Using custom syslog server and default port" +
+ _functions.OVIRT_VARS["OVIRT_SYSLOG_SERVER"] + ":" +
+ "514" + ".")
+ ovirt_rsyslog(_functions.OVIRT_VARS["OVIRT_SYSLOG_SERVER"],
+ "514", "udp")
+ return True
else:
logger.info("Using default syslog server " +
_functions.OVIRT_VARS["OVIRT_SYSLOG_SERVER"] + ":" +
--
To view, visit http://gerrit.ovirt.org/28346
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1eadbac0749d630f67a3bcd60f2f7791fffd5f2
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>
More information about the node-patches
mailing list