This commit is contained in:
Savetheinternet
2011-11-18 23:39:13 +11:00
parent a37a14a398
commit 3e28328dc9
4 changed files with 31 additions and 7 deletions

View File

@@ -61,10 +61,15 @@
'bottom' => '<div class="boardlist bottom">' . $body . '</div>'
);
}
function error($message) {
function error($message, $priority = true) {
global $board, $mod, $config;
if($config['syslog'] && $priority !== false) {
// Use LOG_NOTICE instead of LOG_ERR or LOG_WARNING because most error message are not significant.
_syslog($priority !== true ? $priority : LOG_NOTICE, $message);
}
if(defined('STDIN')) {
// Running from CLI
die('Error: ' . $message . "\n");