Flow PHP

LoggerProvider

Read onlyYes
FinalYes

Methods

__construct()  : mixed
logger()  : Logger
Create a logger for the given instrumentation scope.

Methods

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)

Return values
Logger
On this page

Search results