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

Breadcrumb

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

function LoggerProviderFactory::create

File

vendor/open-telemetry/sdk/Logs/LoggerProviderFactory.php, line 14

Class

LoggerProviderFactory

Namespace

OpenTelemetry\SDK\Logs

Code

public function create(?MeterProviderInterface $meterProvider = null, ?ResourceInfo $resource = null) : LoggerProviderInterface {
    if (Sdk::isDisabled()) {
        return NoopLoggerProvider::getInstance();
    }
    $exporter = (new ExporterFactory())->create();
    $processor = (new LogRecordProcessorFactory())->create($exporter, $meterProvider);
    $instrumentationScopeFactory = new InstrumentationScopeFactory((new LogRecordLimitsBuilder())->build()
        ->getAttributeFactory());
    return new LoggerProvider($processor, $instrumentationScopeFactory, $resource);
}

API Navigation

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