class NullLogger in Zircon Profile 8
Same name in this branch
- 8 vendor/symfony/http-kernel/Log/NullLogger.php \Symfony\Component\HttpKernel\Log\NullLogger
 - 8 vendor/psr/log/Psr/Log/NullLogger.php \Psr\Log\NullLogger
 
Same name and namespace in other branches
- 8.0 vendor/psr/log/Psr/Log/NullLogger.php \Psr\Log\NullLogger
 
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.
Hierarchy
- class \Psr\Log\AbstractLogger implements LoggerInterface
- class \Psr\Log\NullLogger
 
 
Expanded class hierarchy of NullLogger
1 file declares its use of NullLogger
- NullLogger.php in vendor/
symfony/ http-kernel/ Log/ NullLogger.php  
File
- vendor/
psr/ log/ Psr/ Log/ NullLogger.php, line 13  
Namespace
Psr\LogView source
class NullLogger extends AbstractLogger {
  /**
   * Logs with an arbitrary level.
   *
   * @param mixed $level
   * @param string $message
   * @param array $context
   * @return null
   */
  public function log($level, $message, array $context = array()) {
    // noop
  }
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            AbstractLogger:: | 
                  public | function | 
            Action must be taken immediately. Overrides LoggerInterface:: | 
                  |
| 
            AbstractLogger:: | 
                  public | function | 
            Critical conditions. Overrides LoggerInterface:: | 
                  |
| 
            AbstractLogger:: | 
                  public | function | 
            Detailed debug information. Overrides LoggerInterface:: | 
                  |
| 
            AbstractLogger:: | 
                  public | function | 
            System is unusable. Overrides LoggerInterface:: | 
                  |
| 
            AbstractLogger:: | 
                  public | function | 
            Runtime errors that do not require immediate action but should typically
be logged and monitored. Overrides LoggerInterface:: | 
                  |
| 
            AbstractLogger:: | 
                  public | function | 
            Interesting events. Overrides LoggerInterface:: | 
                  |
| 
            AbstractLogger:: | 
                  public | function | 
            Normal but significant events. Overrides LoggerInterface:: | 
                  |
| 
            AbstractLogger:: | 
                  public | function | 
            Exceptional occurrences that are not errors. Overrides LoggerInterface:: | 
                  |
| 
            NullLogger:: | 
                  public | function | 
            Logs with an arbitrary level. Overrides LoggerInterface:: |