summaryrefslogtreecommitdiff
path: root/app/Core
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2018-03-05 13:34:04 -0800
committerFrédéric Guillot <fred@kanboard.net>2018-03-05 13:34:04 -0800
commit95ac11a6aad8238a8349d8bda421739307987cae (patch)
treeebd4c8ff1bfa8ea9db74a1e7c1b8ea62336d2d6b /app/Core
parent299198f7181fccf1e9a684649d173a1ebbdfbd1e (diff)
Add system log driver and use it by default
Diffstat (limited to 'app/Core')
-rw-r--r--app/Core/Log/System.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/Core/Log/System.php b/app/Core/Log/System.php
new file mode 100644
index 00000000..ce801a02
--- /dev/null
+++ b/app/Core/Log/System.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Kanboard\Core\Log;
+
+/**
+ * Built-in PHP Logger
+ *
+ * @package Kanboard\Core\Log
+ * @author Frédéric Guillot
+ */
+class System extends Base
+{
+ /**
+ * Logs with an arbitrary level.
+ *
+ * @param mixed $level
+ * @param string $message
+ * @param array $context
+ * @return null
+ */
+ public function log($level, $message, array $context = [])
+ {
+ error_log('['.$level.'] '.$this->interpolate($message, $context));
+ }
+}