summaryrefslogtreecommitdiff
path: root/inc/display.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/display.php')
-rw-r--r--inc/display.php9
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");