CoreFiles by mySites.guru
NullLogger.php26 lines, 643 bytes, from Joomla_5.2.3-Stable-Full_Package.zip
Raw History Compare with 5.2.2
md5
2e6c21feb2d479317b5edb5a345bb4ad
sha1
72c698ee027a6f01860f24cf4c3095e008617ee9
sha256
22fbb348f7b25259ca801f595fc9aa22b9f035a44e7899687bd89bf4070d78c8
<?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[] $context
     *
     * @throws \Psr\Log\InvalidArgumentException
     */
    public function log($level, string|\Stringable $message, array $context = []): void
    {
        // noop
    }
}

The same content is in 116 releases, Joomla 5.2.0-beta2 to 6.3.0-alpha1. See them all, or every version of this file.