Skip to main content

DefaultLogger

The default logger, which logs to the console (stdout) with optional timestamps. Since this logger is part of the default Vendure configuration, you do not need to specify it explicitly in your server config. You would only need to specify it if you wish to change the log level (which defaults to LogLevel.Info) or remove the timestamp.

Example

Ts
Signature

constructor

method(options?: { level?: LogLevel; timestamp?: boolean }) => DefaultLogger

setDefaultContext

method(defaultContext: string) =>

error

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

warn

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

info

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

verbose

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

debug

method(message: string, context?: string) => void
Was this chapter helpful?
Report Issue
Edited Feb 25, 2026ยทEdit this page