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
Namespace
OpenTelemetry\SDK\LogsCode
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;
}