# buildMessage() function · @imqueue/async-logger

Source: https://imqueue.org/api/async-logger/latest/async-logger.buildmessage/
Published: 2026-07-31
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/async-logger 3.2.0 — generated reference, not hand-written

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:**

```typescript
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.

