@@ -32,7 +32,7 @@ |
||
| 32 | 32 | return $handler; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - $formatter= $config->getFormatter(); |
|
| 35 | + $formatter = $config->getFormatter(); |
|
| 36 | 36 | |
| 37 | 37 | if ($formatter) { |
| 38 | 38 | $handler->setFormatter($this->getFormatter($formatter)); |
@@ -36,6 +36,10 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | abstract protected function getServiceConfig($id) : ConfigInterface; |
| 39 | + |
|
| 40 | + /** |
|
| 41 | + * @param string $id |
|
| 42 | + */ |
|
| 39 | 43 | abstract protected function hasServiceConfig($id) : bool; |
| 40 | 44 | |
| 41 | 45 | public function get($id) |
@@ -74,6 +78,9 @@ discard block |
||
| 74 | 78 | return $this->hasServiceConfig($id); |
| 75 | 79 | } |
| 76 | 80 | |
| 81 | + /** |
|
| 82 | + * @param string $id |
|
| 83 | + */ |
|
| 77 | 84 | protected function getInstanceFromFactory($id) |
| 78 | 85 | { |
| 79 | 86 | $class = null; |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | { |
| 11 | 11 | public function __invoke(array $options) |
| 12 | 12 | { |
| 13 | - $batchMode = (int) ($options['batchMode'] ?? JsonFormatter::BATCH_MODE_JSON); |
|
| 13 | + $batchMode = (int) ($options['batchMode'] ?? JsonFormatter::BATCH_MODE_JSON); |
|
| 14 | 14 | $appendNewline = (boolean) ($options['appendNewline'] ?? true); |
| 15 | 15 | return new JsonFormatter($batchMode, $appendNewline); |
| 16 | 16 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | { |
| 14 | 14 | public function __invoke(array $options) |
| 15 | 15 | { |
| 16 | - $maxNestingLevel = (int) ($options['maxNestingLevel'] ?? 3); |
|
| 16 | + $maxNestingLevel = (int) ($options['maxNestingLevel'] ?? 3); |
|
| 17 | 17 | $exceptionTraceAsString = (boolean) ($options['exceptionTraceAsString'] ?? true); |
| 18 | 18 | return new MongoDBFormatter($maxNestingLevel, $exceptionTraceAsString); |
| 19 | 19 | } |
@@ -10,9 +10,9 @@ |
||
| 10 | 10 | { |
| 11 | 11 | public function __invoke(array $options) |
| 12 | 12 | { |
| 13 | - $applicationName = $options['applicationName'] ?? null; |
|
| 14 | - $systemName = $options['systemName'] ?? null; |
|
| 15 | - $extraPrefix = $options['extraPrefix'] ?? null; |
|
| 13 | + $applicationName = $options['applicationName'] ?? null; |
|
| 14 | + $systemName = $options['systemName'] ?? null; |
|
| 15 | + $extraPrefix = $options['extraPrefix'] ?? null; |
|
| 16 | 16 | $contextPrefix = (string) ($options['contextPrefix'] ?? 'ctxt_'); |
| 17 | 17 | |
| 18 | 18 | return new LogstashFormatter($applicationName, $systemName, $extraPrefix, $contextPrefix); |
@@ -13,8 +13,8 @@ |
||
| 13 | 13 | { |
| 14 | 14 | public function __invoke(array $options) |
| 15 | 15 | { |
| 16 | - $format = $options['format'] ?? null; |
|
| 17 | - $dateFormat = $options['dateFormat'] ?? null; |
|
| 16 | + $format = $options['format'] ?? null; |
|
| 17 | + $dateFormat = $options['dateFormat'] ?? null; |
|
| 18 | 18 | $allowInlineLineBreaks = (bool) ($options['allowInlineLineBreaks'] ?? false); |
| 19 | 19 | $ignoreEmptyContextAndExtra = (bool) ($options['ignoreEmptyContextAndExtra'] ?? false); |
| 20 | 20 | |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | { |
| 11 | 11 | public function __invoke(array $options) |
| 12 | 12 | { |
| 13 | - $batchMode = $options['batchMode'] ?? LogglyFormatter::BATCH_MODE_NEWLINES; |
|
| 13 | + $batchMode = $options['batchMode'] ?? LogglyFormatter::BATCH_MODE_NEWLINES; |
|
| 14 | 14 | $appendNewline = (boolean) ($options['appendNewline'] ?? true); |
| 15 | 15 | return new LogglyFormatter($batchMode, $appendNewline); |
| 16 | 16 | } |
@@ -11,16 +11,16 @@ |
||
| 11 | 11 | { |
| 12 | 12 | public function __invoke(array $options) |
| 13 | 13 | { |
| 14 | - $token = (string) ($options['token'] ?? ''); |
|
| 15 | - $users = (array) ($options['users'] ?? []); |
|
| 16 | - $title = $options['title'] ?? null; |
|
| 17 | - $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
| 14 | + $token = (string) ($options['token'] ?? ''); |
|
| 15 | + $users = (array) ($options['users'] ?? []); |
|
| 16 | + $title = $options['title'] ?? null; |
|
| 17 | + $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
| 18 | 18 | $bubble = (boolean) ($options['bubble'] ?? true); |
| 19 | 19 | $useSSL = (boolean) ($options['useSSL'] ?? true); |
| 20 | - $highPriorityLevel = (int) ($options['highPriorityLevel'] ?? Logger::CRITICAL); |
|
| 21 | - $emergencyLevel = (int) ($options['emergencyLevel'] ?? Logger::EMERGENCY); |
|
| 22 | - $retry = (int) ($options['retry'] ?? 30); |
|
| 23 | - $expire = (int) ($options['expire'] ?? 25200); |
|
| 20 | + $highPriorityLevel = (int) ($options['highPriorityLevel'] ?? Logger::CRITICAL); |
|
| 21 | + $emergencyLevel = (int) ($options['emergencyLevel'] ?? Logger::EMERGENCY); |
|
| 22 | + $retry = (int) ($options['retry'] ?? 30); |
|
| 23 | + $expire = (int) ($options['expire'] ?? 25200); |
|
| 24 | 24 | |
| 25 | 25 | return new PushoverHandler( |
| 26 | 26 | $token, |
@@ -11,8 +11,8 @@ |
||
| 11 | 11 | { |
| 12 | 12 | public function __invoke(array $options) |
| 13 | 13 | { |
| 14 | - $url = (string) ($options['url'] ?? ''); |
|
| 15 | - $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
| 14 | + $url = (string) ($options['url'] ?? ''); |
|
| 15 | + $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
| 16 | 16 | $bubble = (boolean) ($options['bubble'] ?? true); |
| 17 | 17 | |
| 18 | 18 | return new CubeHandler( |