From 06f8fd6e89abf53b5a4f0ee62c0ce771c194843a Mon Sep 17 00:00:00 2001 From: "andreas.grueninger" Date: Sat, 6 Oct 2012 17:59:39 +0200 Subject: [PATCH] The same log entry is written twice when HA_LOGFILE=HA_DEBUGLOG --- heartbeat/ocf-shellfuncs.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in index 473a409273..f3822b7677 100644 --- a/heartbeat/ocf-shellfuncs.in +++ b/heartbeat/ocf-shellfuncs.in @@ -235,7 +235,9 @@ ha_log() { [ -n "$HA_DEBUGLOG" ] then : appending to $HA_DEBUGLOG - echo "$HA_LOGTAG: "`hadate`"${*}" >> $HA_DEBUGLOG + if [ "$HA_LOGFILE"x != "$HA_DEBUGLOG"x ]; then + echo "$HA_LOGTAG: "`hadate`"${*}" >> $HA_DEBUGLOG + fi fi }