fixed syslog() for CLI mode
This commit is contained in:
parent
38c53c9002
commit
2050a97e13
@ -165,7 +165,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _syslog($priority, $message) {
|
function _syslog($priority, $message) {
|
||||||
syslog($priority, $message . ' - client: ' . $_SERVER['REMOTE_ADDR'] . ', request: "' . $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI'] . '"');
|
if( isset($_SERVER['REMOTE_ADDR']) &&
|
||||||
|
isset($_SERVER['REQUEST_METHOD']) &&
|
||||||
|
isset($_SERVER['REQUEST_URI'])) {
|
||||||
|
// CGI
|
||||||
|
syslog($priority, $message . ' - client: ' . $_SERVER['REMOTE_ADDR'] . ', request: "' . $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI'] . '"');
|
||||||
|
} else {
|
||||||
|
syslog($priority, $message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadThemeConfig($_theme) {
|
function loadThemeConfig($_theme) {
|
||||||
|
Loading…
Reference in New Issue
Block a user