Flow PHP

SeverityMapper

Read onlyYes
FinalYes

Methods

__construct()  : mixed
defaultMapping()  : array<int, Severity>
Get the default mapping from Monolog levels to Telemetry severity.
map()  : Severity
Map a Monolog Level to a Telemetry Severity.

Methods

__construct()

public __construct([null|array<int, Severity> $customMapping = null ]) : mixed
Parameters
$customMapping : null|array<int, Severity> = null

Optional custom mapping (Monolog Level value => Telemetry Severity)

defaultMapping()

Get the default mapping from Monolog levels to Telemetry severity.

public static defaultMapping() : array<int, Severity>
Return values
array<int, Severity>

map()

Map a Monolog Level to a Telemetry Severity.

public map(Level $level) : Severity
Parameters
$level : Level

The Monolog log level

Tags
throws
InvalidArgumentException

When no mapping exists for the given level

Return values
Severity —

The corresponding Telemetry severity

On this page

Search results