From 0f179d6090cb9fb8cf0fd286e1a5553899e49b88 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 29 Sep 2012 17:34:10 +0000 Subject: [PATCH] logging: Decrease runtime of the log function. --- functions.logging | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/functions.logging b/functions.logging index cb44efe7..d3043ef8 100644 --- a/functions.logging +++ b/functions.logging @@ -40,16 +40,14 @@ function log() { fi local funcname="${FUNCNAME[1]}" - if isset funcname; then - message_log="${funcname}: ${message_log}" - fi + message_log="${funcname}: ${message_log}" # Set a prefix if we are in a hook. if [ -n "${HOOK}" ]; then message_log="${HOOK}: ${message_log}" fi - logger -t "${LOG_FACILITY}[$$]" "${message_log}" + logger -t "${LOG_FACILITY}[$$]" "${message_log}" & # Leave here, when there should be no output on the console. [ "${LOG_DISABLE_STDOUT}" = "true" ] && return 0 -- 2.47.3