buildMessage() function
Renders console.log-style arguments into the single string a transport record needs, applying util.format so %s/%d/%j placeholders and object inspection behave exactly as they do on the console.
Signature:
export declare function buildMessage(args: any[]): string;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
args |
any[] |
the logging arguments, first one treated as the format string |
Returns:
string
the formatted message
Remarks
MUTATES the array it is given — the first element is shifted off to serve as the format string. Pass a copy if you need the original afterwards.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.