/** * Severity translation between Stacks' logger and loghq's wire format. * * These two vocabularies do not line up, and the mismatch is lossy in both * directions: * * Stacks (clarity) debug info success warning error * loghq (RFC 5424) debug info notice warning error critical alert emergency * * So `success` has no destination, and `notice` and everything above `error` * has no source. `success` is mapped to `info` with the original preserved in * context rather than invented into `notice`, because `notice` means "normal * but significant" and a success message is neither reliably. The severities a * Stacks app cannot currently emit are a framework limitation, not one this * package can paper over. */ import type { LogHQLevel } from './types'; /** * Coerce any logger's level name to a loghq severity. * * Unrecognized input falls back to `fallback` rather than throwing: a log call * must never fail because of its own severity string. */ export declare function toLogHQLevel(input: unknown, fallback?: LogHQLevel): LogHQLevel; /** * Whether the original level name survives the mapping. * * Callers use this to decide if `context.original_level` is worth setting; * recording `original_level: "error"` on an entry already at `error` is noise. */ export declare function isLossy(input: unknown): boolean; /** RFC 5424 rank. Higher is more severe. Unknown levels rank as `info`. */ export declare function rankOf(level: LogHQLevel): number; /** Whether `level` is at least as severe as `min`. */ export declare function atLeast(level: LogHQLevel, min: LogHQLevel): boolean;