# defender-security/6.2.2/lib/packages/Psr/Log/NullLogger.php

Defender Security – Malware Scanner, Login Security &amp; Firewall, version 6.2.2. 31 lines.

- Page: https://pluginprobe.com/plugins/defender-security/6.2.2/code/lib/packages/Psr/Log/NullLogger.php
- Raw: https://pluginprobe.com/plugins/defender-security/6.2.2/raw/lib/packages/Psr/Log/NullLogger.php
- Modified: 2026-08-24T08:19:12+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/defender-security/6.2.2/code/lib/packages/Psr/Log/NullLogger.php#L10-L20`.

```php
<?php

namespace WP_DEFENDER_VENDOR\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 \WP_DEFENDER_VENDOR\Psr\Log\InvalidArgumentException
     */
    public function log($level, $message, array $context = array())
    {
        // noop
    }
}

```
