logWithContext
FitFileViewer - API Documentation v29.9.0
FitFileViewer - API Documentation / main/logging/logWithContext / logWithContext
Function: logWithContext()
logWithContext(
level:string,message:string,context?:Record<string,unknown>):void
Defined in: main/logging/logWithContext.js:11
Logs a message from the main process with optional structured context for easier debugging. The implementation mirrors the behaviour that previously lived in main.js so existing log expectations in tests remain unchanged.
Parametersβ
levelβ
string
Console method to invoke.
messageβ
string
Message to log.
context?β
Record<string, unknown> = {}
Optional context payload
serialized to JSON. Default is {}
Returnsβ
void