modify plugin name
This commit is contained in:
@@ -10,23 +10,18 @@ declare(strict_types=1);
|
||||
namespace Kiri\Abstracts;
|
||||
|
||||
|
||||
use Database\Connection;
|
||||
use Exception;
|
||||
use Kafka\KafkaProvider;
|
||||
use Kiri;
|
||||
use Kiri\Cache\Redis;
|
||||
use Kiri\Di\LocalService;
|
||||
use Kiri\Error\{ErrorHandler};
|
||||
use Kiri\Error\StdoutLogger;
|
||||
use Kiri\Error\StdoutLoggerInterface;
|
||||
use Kiri\Error\StdoutLogger;
|
||||
use Kiri\Exception\{InitException, NotFindClassException};
|
||||
use Kiri\Message\Handler\Router;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Kiri\Server\{Server};
|
||||
use Psr\Log\LoggerInterface;
|
||||
use ReflectionException;
|
||||
use Swoole\Table;
|
||||
|
||||
/**
|
||||
* Class BaseApplication
|
||||
|
||||
@@ -14,7 +14,7 @@ use Exception;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use Kiri;
|
||||
use Kiri\Di\Container;
|
||||
use Kiri\Error\StdoutLogger;
|
||||
use Kiri\Error\StdoutLoggerInterface;
|
||||
use Kiri\Events\EventDispatch;
|
||||
use Kiri\Events\EventProvider;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
@@ -32,7 +32,7 @@ class Component implements Configure
|
||||
{
|
||||
|
||||
|
||||
protected ?StdoutLogger $logger = null;
|
||||
protected ?StdoutLoggerInterface $logger = null;
|
||||
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,7 @@ class Component implements Configure
|
||||
public function __construct(array $config = [])
|
||||
{
|
||||
if (is_null($this->logger)) {
|
||||
$this->logger = Kiri::getDi()->get(StdoutLogger::class);
|
||||
$this->logger = Kiri::getDi()->get(StdoutLoggerInterface::class);
|
||||
}
|
||||
if (!empty($config) && is_array($config)) {
|
||||
Kiri::configure($this, $config);
|
||||
|
||||
@@ -7,11 +7,11 @@ use Kiri;
|
||||
use Kiri\Abstracts\Config;
|
||||
use Kiri\Annotation\Inject;
|
||||
use Kiri\Core\Json;
|
||||
use Kiri\Error\StdoutLoggerInterface;
|
||||
use Kiri\Exception\ConfigException;
|
||||
use Swoole\Coroutine;
|
||||
use Swoole\Process;
|
||||
use Swoole\Timer;
|
||||
use Kiri\Error\StdoutLogger;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
@@ -39,8 +39,8 @@ class HotReload extends Command
|
||||
public Inotify|Scaner $driver;
|
||||
|
||||
|
||||
#[Inject(StdoutLogger::class)]
|
||||
public StdoutLogger $logger;
|
||||
#[Inject(StdoutLoggerInterface::class)]
|
||||
public StdoutLoggerInterface $logger;
|
||||
|
||||
|
||||
protected mixed $source = NULL;
|
||||
@@ -117,7 +117,7 @@ class HotReload extends Command
|
||||
}
|
||||
$data = Json::to(500, $error[1], $path);
|
||||
|
||||
$this->logger->error($data, 'error');
|
||||
$this->logger->error('error', [$data]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Kiri\FileListen;
|
||||
|
||||
use Exception;
|
||||
use Kiri\Error\StdoutLogger;
|
||||
use Kiri\Error\StdoutLoggerInterface;
|
||||
use Swoole\Event;
|
||||
use Swoole\Timer;
|
||||
|
||||
@@ -103,7 +103,7 @@ class Inotify
|
||||
*/
|
||||
public function reload($path)
|
||||
{
|
||||
\Kiri::getDi()->get(StdoutLogger::class)->warning('file change');
|
||||
\Kiri::getDi()->get(StdoutLoggerInterface::class)->warning('file change');
|
||||
|
||||
$this->process->trigger_reload($path);
|
||||
$this->process->int = -1;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Kiri\FileListen;
|
||||
|
||||
use Exception;
|
||||
use Kiri\Error\StdoutLogger;
|
||||
use Kiri\Error\StdoutLoggerInterface;
|
||||
|
||||
class Scaner
|
||||
{
|
||||
@@ -113,7 +113,7 @@ class Scaner
|
||||
{
|
||||
$this->isReloading = TRUE;
|
||||
|
||||
\Kiri::getDi()->get(StdoutLogger::class)->warning('file change');
|
||||
\Kiri::getDi()->get(StdoutLoggerInterface::class)->warning('file change');
|
||||
|
||||
$this->process->trigger_reload($path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user