src/Formatter/JsonFormatterFactory.php 1 location
|
@@ 10-18 (lines=9) @@
|
7 |
|
use Monolog\Formatter\JsonFormatter; |
8 |
|
use WShafer\PSR11MonoLog\FactoryInterface; |
9 |
|
|
10 |
|
class JsonFormatterFactory implements FactoryInterface |
11 |
|
{ |
12 |
|
public function __invoke(array $options) |
13 |
|
{ |
14 |
|
$batchMode = (int) ($options['batchMode'] ?? JsonFormatter::BATCH_MODE_JSON); |
15 |
|
$appendNewline = (bool) ($options['appendNewline'] ?? true); |
16 |
|
return new JsonFormatter($batchMode, $appendNewline); |
17 |
|
} |
18 |
|
} |
19 |
|
|
src/Formatter/LogglyFormatterFactory.php 1 location
|
@@ 10-18 (lines=9) @@
|
7 |
|
use Monolog\Formatter\LogglyFormatter; |
8 |
|
use WShafer\PSR11MonoLog\FactoryInterface; |
9 |
|
|
10 |
|
class LogglyFormatterFactory implements FactoryInterface |
11 |
|
{ |
12 |
|
public function __invoke(array $options) |
13 |
|
{ |
14 |
|
$batchMode = $options['batchMode'] ?? LogglyFormatter::BATCH_MODE_NEWLINES; |
15 |
|
$appendNewline = (bool) ($options['appendNewline'] ?? true); |
16 |
|
return new LogglyFormatter($batchMode, $appendNewline); |
17 |
|
} |
18 |
|
} |
19 |
|
|