From: Michael Tremer Date: Sat, 29 Sep 2012 17:34:10 +0000 (+0000) Subject: logging: Decrease runtime of the log function. X-Git-Tag: 005~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f179d6090cb9fb8cf0fd286e1a5553899e49b88;p=network.git logging: Decrease runtime of the log function. --- 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