Last change
on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago |
Upload project files
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[e3d4e0a] | 1 | <?php declare(strict_types=1);
|
---|
| 2 |
|
---|
| 3 | /*
|
---|
| 4 | * This file is part of the Monolog package.
|
---|
| 5 | *
|
---|
| 6 | * (c) Jordi Boggiano <j.boggiano@seld.be>
|
---|
| 7 | *
|
---|
| 8 | * For the full copyright and license information, please view the LICENSE
|
---|
| 9 | * file that was distributed with this source code.
|
---|
| 10 | */
|
---|
| 11 |
|
---|
| 12 | namespace Monolog\Attribute;
|
---|
| 13 |
|
---|
| 14 | /**
|
---|
| 15 | * A reusable attribute to help configure a class or a method as a processor.
|
---|
| 16 | *
|
---|
| 17 | * Using it offers no guarantee: it needs to be leveraged by a Monolog third-party consumer.
|
---|
| 18 | *
|
---|
| 19 | * Using it with the Monolog library only has no effect at all: processors should still be turned into a callable if
|
---|
| 20 | * needed and manually pushed to the loggers and to the processable handlers.
|
---|
| 21 | */
|
---|
| 22 | #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
|
---|
| 23 | class AsMonologProcessor
|
---|
| 24 | {
|
---|
| 25 | /**
|
---|
| 26 | * @param string|null $channel The logging channel the processor should be pushed to.
|
---|
| 27 | * @param string|null $handler The handler the processor should be pushed to.
|
---|
| 28 | * @param string|null $method The method that processes the records (if the attribute is used at the class level).
|
---|
| 29 | * @param int|null $priority The priority of the processor so the order can be determined.
|
---|
| 30 | */
|
---|
| 31 | public function __construct(
|
---|
| 32 | public readonly ?string $channel = null,
|
---|
| 33 | public readonly ?string $handler = null,
|
---|
| 34 | public readonly ?string $method = null,
|
---|
| 35 | public readonly ?int $priority = null
|
---|
| 36 | ) {
|
---|
| 37 | }
|
---|
| 38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.