Last change
on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago |
Upload project files
|
-
Property mode
set to
100644
|
File size:
643 bytes
|
Rev | Line | |
---|
[e3d4e0a] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | namespace Psr\Log;
|
---|
| 4 |
|
---|
| 5 | /**
|
---|
| 6 | * This Logger can be used to avoid conditional log calls.
|
---|
| 7 | *
|
---|
| 8 | * Logging should always be optional, and if no logger is provided to your
|
---|
| 9 | * library creating a NullLogger instance to have something to throw logs at
|
---|
| 10 | * is a good way to avoid littering your code with `if ($this->logger) { }`
|
---|
| 11 | * blocks.
|
---|
| 12 | */
|
---|
| 13 | class NullLogger extends AbstractLogger
|
---|
| 14 | {
|
---|
| 15 | /**
|
---|
| 16 | * Logs with an arbitrary level.
|
---|
| 17 | *
|
---|
| 18 | * @param mixed[] $context
|
---|
| 19 | *
|
---|
| 20 | * @throws \Psr\Log\InvalidArgumentException
|
---|
| 21 | */
|
---|
| 22 | public function log($level, string|\Stringable $message, array $context = []): void
|
---|
| 23 | {
|
---|
| 24 | // noop
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.