Severity
: int
in package
Table of Contents
Cases
- DEBUG = 5
- DEBUG2 = 6
- DEBUG3 = 7
- DEBUG4 = 8
- ERROR = 17
- ERROR2 = 18
- ERROR3 = 19
- ERROR4 = 20
- FATAL = 21
- FATAL2 = 22
- FATAL3 = 23
- FATAL4 = 24
- INFO = 9
- INFO2 = 10
- INFO3 = 11
- INFO4 = 12
- TRACE = 1
- TRACE2 = 2
- TRACE3 = 3
- TRACE4 = 4
- WARN = 13
- WARN2 = 14
- WARN3 = 15
- WARN4 = 16
Methods
- fromName() : self
- Resolves a case-insensitive case name, as used by the `SeverityNumber` config enum.
- fromPsr3() : self
- Maps PSR-3 severity level (string) to the appropriate opentelemetry severity
- toPsr3() : "debug"|"info"|"notice"|"warning"|"error"|"critical"|"alert"|"emergency"
- Maps to a PSR-3 level, inverting {@see self::fromPsr3()}.
Cases
TRACE
TRACE2
TRACE3
TRACE4
DEBUG
DEBUG2
DEBUG3
DEBUG4
INFO
INFO2
INFO3
INFO4
WARN
WARN2
WARN3
WARN4
ERROR
ERROR2
ERROR3
ERROR4
FATAL
FATAL2
FATAL3
FATAL4
Methods
fromName()
Resolves a case-insensitive case name, as used by the `SeverityNumber` config enum.
public
static fromName(string $name) : self
Parameters
- $name : string
Return values
selffromPsr3()
Maps PSR-3 severity level (string) to the appropriate opentelemetry severity
public
static fromPsr3(string $level) : self
Parameters
- $level : string
Tags
Return values
selftoPsr3()
Maps to a PSR-3 level, inverting {@see self::fromPsr3()}.
public
toPsr3() : "debug"|"info"|"notice"|"warning"|"error"|"critical"|"alert"|"emergency"
PSR-3's levels are the RFC 5424 severities, which the spec's example mappings pin to particular cases: Notice to INFO2, Critical to ERROR2, Alert to ERROR3, Emergency to FATAL. Nothing is pinned to the remaining numbered cases, so each maps to the nearest pinned case at or below it. Mapping down rather than up keeps the result monotonic, which matters where the level is a threshold: INFO3 outranks INFO2, so it must not map to a more verbose PSR-3 level than INFO2 does. The trade is that a threshold may admit slightly more than asked for, never less.