LoggerProvider
in package
implements
LoggerProviderInterface
Table of Contents
Interfaces
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
$configurator
private
Configurator|null
$configurator
= null
$instrumentationScopeFactory read-only
private
InstrumentationScopeFactoryInterface
$instrumentationScopeFactory
$loggers read-only
private
WeakMap
$loggers
$loggerSharedState read-only
private
LoggerSharedState
$loggerSharedState
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
builder()
public
static builder() : LoggerProviderBuilder
Return values
LoggerProviderBuilderforceFlush()
public
forceFlush([CancellationInterface|null $cancellation = null ]) : bool
Parameters
- $cancellation : CancellationInterface|null = null
Return values
boolgetLogger()
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
Return values
LoggerInterfaceshutdown()
public
shutdown([CancellationInterface|null $cancellation = null ]) : bool
Parameters
- $cancellation : CancellationInterface|null = null
Return values
boolupdateConfigurator()
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