LoggerProvider
Read onlyYes
FinalYes
Methods
- __construct() : mixed
- logger() : Logger
- Create a logger for the given instrumentation scope.
Methods
__construct()
public
__construct(LogProcessor $processor, ClockInterface $clock, ContextStorage $contextStorage[, LogRecordLimits $limits = new LogRecordLimits() ][, ErrorHandler $errorHandler = new ErrorLogHandler() ]) : mixed
Parameters
- $processor : LogProcessor
- $clock : ClockInterface
- $contextStorage : ContextStorage
- $limits : LogRecordLimits = new LogRecordLimits()
- $errorHandler : ErrorHandler = new ErrorLogHandler()
logger()
Create a logger for the given instrumentation scope.
public
logger(Resource $resource, string $name[, string $version = 'unknown' ][, null|string $schemaUrl = null ][, null|Attributes $attributes = null ][, null|Attributes $signalAttributes = null ]) : Logger
Note: Instance caching is handled by the Telemetry class. This method always creates a new Logger instance.
Parameters
- $resource : Resource
-
The resource context for all logs from this logger
- $name : string
-
The name of the instrumentation scope (e.g., library name)
- $version : string = 'unknown'
-
The version of the instrumentation scope
- $schemaUrl : null|string = null
-
Schema URL for semantic conventions
- $attributes : null|Attributes = null
-
Additional scope attributes
- $signalAttributes : null|Attributes = null
-
Default attributes merged into every emitted log record (per-call values win)