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

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

Reads the running service's own name and version, used to expand the `%name` and `%version` placeholders in the logger environment variables.

**Signature:**

```typescript
export declare function pkg(): {
    name: string;
    version: string;
};
```
**Returns:**

{ name: string; version: string; }

the service name and version, or the fallback pair

## Remarks

Resolved from `package.json` in the process's CURRENT WORKING DIRECTORY, not from this package's location. A service started from a different directory therefore reports whatever it finds there, and one started somewhere with no `package.json` falls back to `{ name: 'logger', version: '' }` rather than failing.

