Skip to content

Commit

Permalink
Merge pull request #9 from cgauge/console-logger
Browse files Browse the repository at this point in the history
Add Console Processor
  • Loading branch information
deleugpn authored Apr 30, 2021
2 parents f26a1b6 + 40c2c9d commit 969c3e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/LogstashLoggerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
9 changes: 9 additions & 0 deletions src/Processors/ConsoleProcessorInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php declare(strict_types=1);

namespace CustomerGauge\Logstash\Processors;

use Monolog\Processor\ProcessorInterface;

interface ConsoleProcessorInterface extends ProcessorInterface
{
}

0 comments on commit 969c3e9

Please sign in to comment.