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

Breadcrumb

  1. Drupal Core 11.1.x

LateBindingLogger.php

Namespace

OpenTelemetry\API\Logs

File

vendor/open-telemetry/api/Logs/LateBindingLogger.php

View source
<?php

declare (strict_types=1);
namespace OpenTelemetry\API\Logs;

use Closure;
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;
    }

}

Classes

Title Deprecated Summary
LateBindingLogger
RSS feed
Powered by Drupal