diff --git a/src/etc/inc/authgui.inc b/src/etc/inc/authgui.inc index 99d1ee9a0..0d14843b8 100644 --- a/src/etc/inc/authgui.inc +++ b/src/etc/inc/authgui.inc @@ -130,7 +130,7 @@ function session_auth() function auth_log($message, $prio = LOG_ERR) { openlog("audit", LOG_ODELAY, LOG_AUTH); - log_error($message, $prio); + log_msg($message, $prio); closelog(); } diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc index 5b64872be..0bf05060b 100644 --- a/src/etc/inc/util.inc +++ b/src/etc/inc/util.inc @@ -926,14 +926,27 @@ function get_interface_list($only_active = false, $include_dmesg = false) /****f* util/log_error * NAME -* log_error - Sends a string to syslog. +* log_error - Sends a string to syslog with LOG_ERR severity. * INPUTS -* $msg - string containing the syslog message. -* $prio - syslog severity level +* $error - string containing the syslog message. * RESULT * null ******/ -function log_error($msg, $prio = LOG_ERR) +function log_error($error) +{ + log_msg($error, LOG_ERR); +} + +/****f* util/log_msg +* NAME +* log_msg - Sends a string to syslog with the required severity level. +* INPUTS +* $msg - string containing the syslog message. +* $prio - syslog severity level. +* RESULT +* null +******/ +function log_msg($msg, $prio = LOG_ERR) { $page = $_SERVER['SCRIPT_NAME']; if (empty($page)) {