Skip to main content

default

FitFileViewer - API Documentation v29.4.0


FitFileViewer - API Documentation / utils/logging / default

Variable: default

default: { getErrorInfo: (err: unknown) => { message: string; stack?: string; }; logWithLevel: (level: LogLevel, message: string, context?: Record<string, any>) => void; }

Defined in: utils/logging/index.js:16

Namespace default keeps compatibility with patterns like import logging from "../logging/index.js"; logging.logWithLevel(...).

Type Declaration​

getErrorInfo()​

getErrorInfo: (err: unknown) => { message: string; stack?: string; }

Safely extract message/stack from unknown errors

Parameters​

err​

unknown

Returns​

{ message: string; stack?: string; }

message​

message: string

stack?​

optional stack: string

logWithLevel()​

logWithLevel: (level: LogLevel, message: string, context?: Record<string, any>) => void

Typed logging helper to avoid dynamic console[level] index signature errors Provides consistent formatting and optional context object.

Parameters​

level​

LogLevel

message​

string

context?​

Record<string, any>

Returns​

void