diff options
author | Frédéric Guillot <fred@kanboard.net> | 2018-03-05 13:34:04 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2018-03-05 13:34:04 -0800 |
commit | 95ac11a6aad8238a8349d8bda421739307987cae (patch) | |
tree | ebd4c8ff1bfa8ea9db74a1e7c1b8ea62336d2d6b /app/Core | |
parent | 299198f7181fccf1e9a684649d173a1ebbdfbd1e (diff) |
Add system log driver and use it by default
Diffstat (limited to 'app/Core')
-rw-r--r-- | app/Core/Log/System.php | 25 |
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)); + } +} |