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

Breadcrumb

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

function LoggerProvider::getLogger

See also

https://github.com/open-telemetry/opentelemetry-specification/blob/main…

File

vendor/open-telemetry/sdk/Logs/LoggerProvider.php, line 41

Class

LoggerProvider

Namespace

OpenTelemetry\SDK\Logs

Code

public function getLogger(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []) : LoggerInterface {
    if ($this->loggerSharedState
        ->hasShutdown()) {
        return NoopLogger::getInstance();
    }
    $scope = $this->instrumentationScopeFactory
        ->create($name, $version, $schemaUrl, $attributes);
    $logger = new Logger($this->loggerSharedState, $scope, $this->configurator);
    $this->loggers
        ->offsetSet($logger, null);
    return $logger;
}

API Navigation

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