变更
This commit is contained in:
@@ -14,7 +14,7 @@ use Exception;
|
||||
use Kiri;
|
||||
use Kiri\Di\LocalService;
|
||||
use ReflectionException;
|
||||
use Kiri\Error\{StdoutLogger, StdoutLoggerInterface};
|
||||
use Kiri\Error\StdoutLogger;
|
||||
use Kiri\Exception\{InitException};
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Kiri\Events\EventProvider;
|
||||
@@ -54,12 +54,12 @@ abstract class BaseMain extends Component
|
||||
/**
|
||||
* @param array $mapping
|
||||
* @param array $components
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
public function mapping(array $mapping, array $components)
|
||||
{
|
||||
$di = Kiri::getDi();
|
||||
$di->set(StdoutLoggerInterface::class, StdoutLogger::class);
|
||||
$di->set(LoggerInterface::class, Logger::class);
|
||||
$di->set(LoggerInterface::class, StdoutLogger::class);
|
||||
foreach ($mapping as $interface => $class) {
|
||||
$di->set($interface, $class);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ class Logger implements LoggerInterface
|
||||
/**
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @throws ConfigException
|
||||
*
|
||||
* 紧急情况
|
||||
*/
|
||||
@@ -48,7 +47,6 @@ class Logger implements LoggerInterface
|
||||
/**
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @throws ConfigException
|
||||
*
|
||||
* 应该警惕的
|
||||
*/
|
||||
@@ -62,7 +60,6 @@ class Logger implements LoggerInterface
|
||||
/**
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @throws ConfigException
|
||||
*
|
||||
* 关键性的日志
|
||||
*/
|
||||
@@ -76,7 +73,6 @@ class Logger implements LoggerInterface
|
||||
/**
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @throws ConfigException
|
||||
*/
|
||||
public function error($message, array $context = [])
|
||||
{
|
||||
@@ -88,7 +84,6 @@ class Logger implements LoggerInterface
|
||||
/**
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @throws ConfigException
|
||||
*/
|
||||
public function warning($message, array $context = [])
|
||||
{
|
||||
@@ -99,7 +94,6 @@ class Logger implements LoggerInterface
|
||||
/**
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @throws ConfigException
|
||||
*/
|
||||
public function notice($message, array $context = [])
|
||||
{
|
||||
@@ -111,7 +105,6 @@ class Logger implements LoggerInterface
|
||||
/**
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @throws ConfigException
|
||||
*/
|
||||
public function info($message, array $context = [])
|
||||
{
|
||||
@@ -123,7 +116,6 @@ class Logger implements LoggerInterface
|
||||
/**
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @throws ConfigException
|
||||
*/
|
||||
public function debug($message, array $context = [])
|
||||
{
|
||||
@@ -136,8 +128,7 @@ class Logger implements LoggerInterface
|
||||
* @param mixed $level
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @throws ConfigException
|
||||
* @throws Exception
|
||||
* @throws
|
||||
*/
|
||||
public function log($level, $message, array $context = [])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user