Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LateBindingLogger.php

class LateBindingLogger

Hierarchy

  • class \OpenTelemetry\API\Logs\LateBindingLogger implements \OpenTelemetry\API\Logs\LoggerInterface

Expanded class hierarchy of LateBindingLogger

File

vendor/open-telemetry/api/Logs/LateBindingLogger.php, line 9

Namespace

OpenTelemetry\API\Logs
View source
class LateBindingLogger implements LoggerInterface {
    private ?LoggerInterface $logger = null;
    
    /** @param Closure(): LoggerInterface $factory */
    public function __construct(Closure $factory) {
    }
    public function emit(LogRecord $logRecord) : void {
        ($this->logger ??= ($this->factory)())
            ->emit($logRecord);
    }
    public function isEnabled() : bool {
        return true;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
LateBindingLogger::$logger private property
LateBindingLogger::emit public function This method should only be used when implementing a `log appender` Overrides LoggerInterface::emit
LateBindingLogger::isEnabled public function Determine if the logger is enabled. Logs bridge API authors SHOULD call this method each time they
are about to generate a LogRecord, to avoid performing computationally expensive work.
@experimental
Overrides LoggerInterface::isEnabled
LateBindingLogger::__construct public function

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal