Skip to content

SudoSOS Back-end API / internal/helpers / StructuredLogEvent

Interface: StructuredLogEvent ​

The shape of a single line of JSON log output.

Log calls are expected to pass a constant message first and their variable parts in an object after it, for example logger.trace('invoice.delete', { invoiceId: 4 }). A constant message can be grouped and counted, whereas a message with values interpolated into it cannot.

Indexable ​

ts
[field: string]: unknown

Anything that was logged next to the message. Objects are merged into this record; other values are collected under args.

Properties ​

actorId? ​

ts
optional actorId?: number;

category ​

ts
category: string;

level ​

ts
level: string;

method? ​

ts
optional method?: string;

msg ​

ts
msg: string;

path? ​

ts
optional path?: string;

requestId? ​

ts
optional requestId?: string;

timestamp ​

ts
timestamp: string;