provide a function to log to syslog
This commit is contained in:
parent
c23dfa0d23
commit
302f49baf2
@ -633,6 +633,19 @@ function attribute_contains($attr, $s) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Log to syslog
|
||||
*
|
||||
* @param string $msg Message to log
|
||||
* @param int $priority - compatible with syslog
|
||||
*/
|
||||
function hz_syslog($msg, $priority = LOG_INFO) {
|
||||
openlog("hz-log", LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
syslog($priority, $msg);
|
||||
closelog();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Logging function for Hubzilla.
|
||||
*
|
||||
|
Reference in New Issue
Block a user