OpenTelemetry PHP

LoggerProvider
in package
implements LoggerProviderInterface

Table of Contents

Interfaces

LoggerProviderInterface

Properties

$configurator  : Configurator|null
$instrumentationScopeFactory  : InstrumentationScopeFactoryInterface
$loggers  : WeakMap
$loggerSharedState  : LoggerSharedState

Methods

__construct()  : mixed
builder()  : LoggerProviderBuilder
forceFlush()  : bool
getLogger()  : LoggerInterface
shutdown()  : bool
updateConfigurator()  : void
Update the {@link Configurator} for a {@link LoggerProvider}, which will reconfigure all loggers created from the provider.

Properties

Methods

__construct()

public __construct(LogRecordProcessorInterface $processor, InstrumentationScopeFactoryInterface $instrumentationScopeFactory[, ResourceInfo|null $resource = null ][, Configurator<string|int, LoggerConfig>|null $configurator = null ]) : mixed
Parameters
$processor : LogRecordProcessorInterface
$instrumentationScopeFactory : InstrumentationScopeFactoryInterface
$resource : ResourceInfo|null = null
$configurator : Configurator<string|int, LoggerConfig>|null = null

getLogger()

public getLogger(string $name[, string|null $version = null ][, string|null $schemaUrl = null ][, iterable<string|int, mixed> $attributes = [] ]) : LoggerInterface
Parameters
$name : string
$version : string|null = null
$schemaUrl : string|null = null
$attributes : iterable<string|int, mixed> = []
Tags
see
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#logger-creation
Attributes
#[Override]
Return values
LoggerInterface

updateConfigurator()

Update the {@link Configurator} for a {@link LoggerProvider}, which will reconfigure all loggers created from the provider.

public updateConfigurator(Configurator $configurator) : void
Parameters
$configurator : Configurator
Tags
experimental
Attributes
#[Override]

        
On this page

Search results