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

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

Parses the default record metadata out of `LOGGER_METADATA`, expanding `%name` and `%version` first.

**Signature:**

```typescript
export declare function defaultMetadata(): JsonObject;
```
**Returns:**

[JsonObject](https://imqueue.org/api/async-logger/latest/async-logger.jsonobject/)

the parsed metadata, or an empty object when unset

## Exceptions

TypeError if the variable is set but not parseable as JSON

## Remarks

These fields are attached to every record sent to a transport — a source tag, an environment name, a hostname — and are what makes records from several services distinguishable at the collector. Console output is unaffected.

