Hyperlinkv0.8.0-beta.28

LogLevel

LogLevel.getOrdinalconsteffect/LogLevel.ts:192
(self: LogLevel): number

Returns the ordinal value of the log level.

When to use

Use to project a LogLevel into the numeric sort key used by LogLevel.Order when custom ordering code or an integration needs a number instead of an Order comparison.

Details

The mapping is All to Number.MIN_SAFE_INTEGER, Trace to 0, Debug to 10000, Info to 20000, Warn to 30000, Error to 40000, Fatal to 50000, and None to Number.MAX_SAFE_INTEGER.

Gotchas

These ordinals are internal sort keys; do not treat them as external severity numbers.

export const getOrdinal = (self: LogLevel): number => effect.logLevelToOrder(self)