1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-01 19:00:20 +02:00

Make AsMonologProcessor compatible with PHP 7.2

This commit is contained in:
Jordi Boggiano
2022-04-08 17:32:03 +02:00
committed by GitHub
parent f2f66cd480
commit 508df120fa

View File

@@ -22,15 +22,25 @@ namespace Monolog\Attribute;
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
class AsMonologProcessor
{
/** @var string|null */
public $channel = null;
/** @var string|null */
public $handler = null;
/** @var string|null */
public $method = null;
/**
* @param string|null $channel The logging channel the processor should be pushed to.
* @param string|null $handler The handler the processor should be pushed to.
* @param string|null $method The method that processes the records (if the attribute is used at the class level).
*/
public function __construct(
public ?string $channel = null,
public ?string $handler = null,
public ?string $method = null,
?string $channel = null,
?string $handler = null,
?string $method = null
) {
$this->channel = $channel;
$this->handler = $handler;
$this->method = $method;
}
}
}