Logger.error() method

Logs at ERROR level.

Signature:

error(...args: any[]): void;

Parameters

Parameter

Type

Description

args

any[]

console.error-style arguments; the first may be a format string with %s/%d/%j placeholders for the rest

Returns:

void

Remarks

Pass an Error and it is formatted like the console would — including the stack. Passing error.stack explicitly is the usual choice when the record has to stay one line for a log shipper.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.