Skip to main content

formatLogLine

@retinue/monorepo


@retinue/monorepo / backend/src / formatLogLine

Function: formatLogLine()

formatLogLine(record): string

Defined in: backend/src/telemetry/redaction.ts:158

A log record as a single line of JSON.

Serialized here rather than by the sink, so every sink emits the same shape and the redaction cannot be bypassed by a sink that formats the record itself. The context is spread at the top level, because a query for runId:... in a log aggregator should not need to know it is nested.

Parameters​

record​

at​

string

context​

Readonly<Record<string, string | undefined>>

event​

string

fields​

Readonly<Record<string, AttributeValue>>

level​

string

Returns​

string