Skip to main content

@tscommon/logger

Index

Type Aliases

LogLabels

LogLabels: Record<string, string | undefined>

A map of key-value pairs that provides additional context to a log entry.

Example:

{ requestId: '12345', userId: '54321' }

LogPayload

LogPayload: Record<string, unknown>

Additional data to be logged.

Example:

{ port: 3000 }
{ error: new Error('Something went wrong.') }
{ status: 500, error: new Error('Something went wrong.') }

Deeply nested data:

{ user: { id: 1, name: 'Alice', friends: [{ id: 2, name: 'Bob' }] } }
// If maximum depth of the data to collect is 2.
{ user: { id: 1, name: 'Alice', friends: '[[Truncated]]' } }
Page Options