Add system log driver and use it by default

This commit is contained in:
Frédéric Guillot
2018-03-05 13:34:04 -08:00
parent 299198f718
commit 95ac11a6aa
7 changed files with 39 additions and 9 deletions

25
app/Core/Log/System.php Normal file
View File

@@ -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));
}
}