]> git.ipfire.org Git - people/ms/network.git/blobdiff - functions.logging
hostapd: Enable WMM by default.
[people/ms/network.git] / functions.logging
index cb44efe71fdcd923ec87eeb7dbf1bf4c334b9320..57b432617220dfec9987b2602eaf512cdf1dbede 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
@@ -66,7 +64,7 @@ function log() {
                WARNING)
                        colour="${CLR_YELLOW_R}"
                        ;;
-               ERROR)
+               CRITICAL|ERROR)
                        colour="${CLR_RED_B}"
                        ;;
        esac