mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 18:44:44 +00:00
util/log_error: keep it clear. add a log_msg (#5498)
add log_msg() and keep log_error() as is.
This commit is contained in:
parent
9225fc3b40
commit
279de63e63
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -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)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user