From 40c2c9db6c2c8b8e353227db6d7933ae7ede5aaa Mon Sep 17 00:00:00 2001 From: Deleu Date: Fri, 30 Apr 2021 16:01:30 +0200 Subject: [PATCH] Add Console Processor --- src/LogstashLoggerFactory.php | 3 +++ src/Processors/ConsoleProcessorInterface.php | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 src/Processors/ConsoleProcessorInterface.php diff --git a/src/LogstashLoggerFactory.php b/src/LogstashLoggerFactory.php index 84d4df8..7b209fd 100644 --- a/src/LogstashLoggerFactory.php +++ b/src/LogstashLoggerFactory.php @@ -5,6 +5,7 @@ use Aws\Sqs\SqsClient; use CustomerGauge\Logstash\Handlers\NoopProcessableHandler; use CustomerGauge\Logstash\Processors\BacktraceProcessor; +use CustomerGauge\Logstash\Processors\ConsoleProcessorInterface; use CustomerGauge\Logstash\Processors\HttpProcessorInterface; use CustomerGauge\Logstash\Processors\QueueProcessorInterface; use Monolog\Formatter\JsonFormatter; @@ -67,6 +68,8 @@ private function processor(array $handlers, ?string $processor): array $processor = $this->container->make(HttpProcessorInterface::class); } elseif ($processor === 'queue') { $processor = $this->container->make(QueueProcessorInterface::class); + } elseif ($processor === 'console') { + $processor = $this->container->make(ConsoleProcessorInterface::class); } foreach ($handlers as $handler) { diff --git a/src/Processors/ConsoleProcessorInterface.php b/src/Processors/ConsoleProcessorInterface.php new file mode 100644 index 0000000..813d7ed --- /dev/null +++ b/src/Processors/ConsoleProcessorInterface.php @@ -0,0 +1,9 @@ +