]> git.ipfire.org Git - network.git/commitdiff
logging: Decrease runtime of the log function.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 29 Sep 2012 17:34:10 +0000 (17:34 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 29 Sep 2012 17:34:10 +0000 (17:34 +0000)
functions.logging

index cb44efe71fdcd923ec87eeb7dbf1bf4c334b9320..d3043ef8afd3a27b53a1a995d8a84efdd1c84a3a 100644 (file)
@@ -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