diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-11-18 23:39:13 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-11-18 23:39:13 +1100 |
| commit | 3e28328dc9b064efc8a03000c82b4e05ac4148eb (patch) | |
| tree | 5ceef08efa9c35bbbb50e6804a75301093bd64c1 /inc/display.php | |
| parent | a37a14a398261e80409ca4218e273fbff5170598 (diff) | |
syslog()
Diffstat (limited to 'inc/display.php')
| -rw-r--r-- | inc/display.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/inc/display.php b/inc/display.php index 655aaf22..93afd59d 100644 --- a/inc/display.php +++ b/inc/display.php @@ -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"); |
