# wp-optimize/4.7.0/vendor/psr/log/Psr/Log/NullLogger.php

WP-Optimize – Cache, Compress images, Minify &amp; Clean database to boost page speed &amp; performance, version 4.7.0. 31 lines.

- Page: https://pluginprobe.com/plugins/wp-optimize/4.7.0/code/vendor/psr/log/Psr/Log/NullLogger.php
- Raw: https://pluginprobe.com/plugins/wp-optimize/4.7.0/raw/vendor/psr/log/Psr/Log/NullLogger.php
- Modified: 2021-06-07T22:42:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-optimize/4.7.0/code/vendor/psr/log/Psr/Log/NullLogger.php#L10-L20`.

```php
<?php

namespace Psr\Log;

/**
 * This Logger can be used to avoid conditional log calls.
 *
 * Logging should always be optional, and if no logger is provided to your
 * library creating a NullLogger instance to have something to throw logs at
 * is a good way to avoid littering your code with `if ($this->logger) { }`
 * blocks.
 */
class NullLogger extends AbstractLogger
{
    /**
     * Logs with an arbitrary level.
     *
     * @param mixed  $level
     * @param string $message
     * @param array  $context
     *
     * @return void
     *
     * @throws \Psr\Log\InvalidArgumentException
     */
    public function log($level, $message, array $context = array())
    {
        // noop
    }
}

```
