|
@@ -35,14 +35,21 @@ use Monolog\Logger;
|
|
|
*/
|
|
*/
|
|
|
class ChannelLevelActivationStrategy implements ActivationStrategyInterface
|
|
class ChannelLevelActivationStrategy implements ActivationStrategyInterface
|
|
|
{
|
|
{
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @var int
|
|
|
|
|
+ */
|
|
|
private $defaultActionLevel;
|
|
private $defaultActionLevel;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @var array
|
|
|
|
|
+ */
|
|
|
private $channelToActionLevel;
|
|
private $channelToActionLevel;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @param int|string $defaultActionLevel The default action level to be used if the record's category doesn't match any
|
|
* @param int|string $defaultActionLevel The default action level to be used if the record's category doesn't match any
|
|
|
* @param array $channelToActionLevel An array that maps channel names to action levels.
|
|
* @param array $channelToActionLevel An array that maps channel names to action levels.
|
|
|
*/
|
|
*/
|
|
|
- public function __construct($defaultActionLevel, $channelToActionLevel = [])
|
|
|
|
|
|
|
+ public function __construct($defaultActionLevel, array $channelToActionLevel = [])
|
|
|
{
|
|
{
|
|
|
$this->defaultActionLevel = Logger::toMonologLevel($defaultActionLevel);
|
|
$this->defaultActionLevel = Logger::toMonologLevel($defaultActionLevel);
|
|
|
$this->channelToActionLevel = array_map('Monolog\Logger::toMonologLevel', $channelToActionLevel);
|
|
$this->channelToActionLevel = array_map('Monolog\Logger::toMonologLevel', $channelToActionLevel);
|