[ Index ]

PHP Cross Reference of YOURLS

title

Body

[close]

/includes/vendor/psr/log/src/ -> NullLogger.php (source)

   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  }


Generated: Mon Mar 31 05:10:02 2025 Cross-referenced by PHPXref 0.7.1