src/Handler/CubeHandlerFactory.php 1 location
|
@@ 11-25 (lines=15) @@
|
| 8 |
|
use Monolog\Logger; |
| 9 |
|
use WShafer\PSR11MonoLog\FactoryInterface; |
| 10 |
|
|
| 11 |
|
class CubeHandlerFactory implements FactoryInterface |
| 12 |
|
{ |
| 13 |
|
public function __invoke(array $options) |
| 14 |
|
{ |
| 15 |
|
$url = (string) ($options['url'] ?? ''); |
| 16 |
|
$level = (int) ($options['level'] ?? Logger::DEBUG); |
| 17 |
|
$bubble = (bool) ($options['bubble'] ?? true); |
| 18 |
|
|
| 19 |
|
return new CubeHandler( |
| 20 |
|
$url, |
| 21 |
|
$level, |
| 22 |
|
$bubble |
| 23 |
|
); |
| 24 |
|
} |
| 25 |
|
} |
| 26 |
|
|
src/Handler/FleepHookHandlerFactory.php 1 location
|
@@ 12-26 (lines=15) @@
|
| 9 |
|
use Monolog\Logger; |
| 10 |
|
use WShafer\PSR11MonoLog\FactoryInterface; |
| 11 |
|
|
| 12 |
|
class FleepHookHandlerFactory implements FactoryInterface |
| 13 |
|
{ |
| 14 |
|
/** |
| 15 |
|
* @param array $options |
| 16 |
|
* @return FleepHookHandler |
| 17 |
|
* @throws MissingExtensionException |
| 18 |
|
*/ |
| 19 |
|
public function __invoke(array $options) |
| 20 |
|
{ |
| 21 |
|
$token = (string) ($options['token'] ?? ''); |
| 22 |
|
$level = (int) ($options['level'] ?? Logger::DEBUG); |
| 23 |
|
$bubble = (bool) ($options['bubble'] ?? true); |
| 24 |
|
|
| 25 |
|
return new FleepHookHandler( |
| 26 |
|
$token, |
| 27 |
|
$level, |
| 28 |
|
$bubble |
| 29 |
|
); |
src/Handler/FlowdockHandlerFactory.php 1 location
|
@@ 12-26 (lines=15) @@
|
| 9 |
|
use Monolog\Logger; |
| 10 |
|
use WShafer\PSR11MonoLog\FactoryInterface; |
| 11 |
|
|
| 12 |
|
class FlowdockHandlerFactory implements FactoryInterface |
| 13 |
|
{ |
| 14 |
|
/** |
| 15 |
|
* @param array $options |
| 16 |
|
* @return FlowdockHandler |
| 17 |
|
* @throws MissingExtensionException |
| 18 |
|
*/ |
| 19 |
|
public function __invoke(array $options) |
| 20 |
|
{ |
| 21 |
|
$apiToken = (string) ($options['apiToken'] ?? ''); |
| 22 |
|
$level = (int) ($options['level'] ?? Logger::DEBUG); |
| 23 |
|
$bubble = (bool) ($options['bubble'] ?? true); |
| 24 |
|
|
| 25 |
|
return new FlowdockHandler( |
| 26 |
|
$apiToken, |
| 27 |
|
$level, |
| 28 |
|
$bubble |
| 29 |
|
); |
src/Handler/LogglyHandlerFactory.php 1 location
|
@@ 12-26 (lines=15) @@
|
| 9 |
|
use Monolog\Logger; |
| 10 |
|
use WShafer\PSR11MonoLog\FactoryInterface; |
| 11 |
|
|
| 12 |
|
class LogglyHandlerFactory implements FactoryInterface |
| 13 |
|
{ |
| 14 |
|
/** |
| 15 |
|
* @param array $options |
| 16 |
|
* @return LogglyHandler |
| 17 |
|
* @throws MissingExtensionException |
| 18 |
|
*/ |
| 19 |
|
public function __invoke(array $options) |
| 20 |
|
{ |
| 21 |
|
$token = (string) ($options['token'] ?? ''); |
| 22 |
|
$level = (int) ($options['level'] ?? Logger::DEBUG); |
| 23 |
|
$bubble = (bool) ($options['bubble'] ?? true); |
| 24 |
|
|
| 25 |
|
return new LogglyHandler( |
| 26 |
|
$token, |
| 27 |
|
$level, |
| 28 |
|
$bubble |
| 29 |
|
); |
src/Processor/IntrospectionProcessorFactory.php 1 location
|
@@ 11-25 (lines=15) @@
|
| 8 |
|
use Monolog\Processor\IntrospectionProcessor; |
| 9 |
|
use WShafer\PSR11MonoLog\FactoryInterface; |
| 10 |
|
|
| 11 |
|
class IntrospectionProcessorFactory implements FactoryInterface |
| 12 |
|
{ |
| 13 |
|
public function __invoke(array $options) |
| 14 |
|
{ |
| 15 |
|
$level = (int) ($options['level'] ?? Logger::DEBUG); |
| 16 |
|
$skipPartials = (array) ($options['skipClassesPartials'] ?? []); |
| 17 |
|
$skipFrameCount = (int) ($options['skipStackFramesCount'] ?? 0); |
| 18 |
|
|
| 19 |
|
return new IntrospectionProcessor( |
| 20 |
|
$level, |
| 21 |
|
$skipPartials, |
| 22 |
|
$skipFrameCount |
| 23 |
|
); |
| 24 |
|
} |
| 25 |
|
} |
| 26 |
|
|