Skip to main content

OtelLogger

OtelLogger

A logger that emits logs to OpenTelemetry and optionally to the console.

Signature

debug

method(message: string, context?: string) => void

warn

method(message: string, context?: string) => void

info

method(message: string, context?: string) => void

error

method(message: string, context?: string) => void

verbose

method(message: string, context?: string) => void

OtelLoggerOptions

Options for the OtelLogger.

Signature

logToConsole

propertyLogLevel

If set to a LogLevel, the logger will also log to the console. This can be useful for local development or debugging.

Example

Ts
Was this chapter helpful?
Report Issue
Edited Apr 20, 2026ยทEdit this page