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