# @faasjs/logger

> FaasJS's logger module.

Latest version **7.1.0** (published 2026-01-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @faasjs/logger
pnpm add @faasjs/logger
yarn add @faasjs/logger
bun add @faasjs/logger
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 7.1.0 |
| Published | 2026-01-21 |
| First published | 2019-05-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=24.0.0 |
| Dependencies | 0 |
| Unpacked size | 43.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 121 |
| Maintainers | zfben |

## Links

- npm: https://www.npmjs.com/package/@faasjs/logger
- Repository: https://github.com/faasjs/faasjs
- Homepage: https://faasjs.com/doc/logger
- Issues: https://github.com/faasjs/faasjs/issues
- Funding: https://github.com/sponsors/faasjs
- npm.io page: https://npm.io/package/@faasjs/logger

## Recent versions

- 7.1.0 (latest) — 2026-01-21
- 8.0.0-beta.8 (beta) — 2026-02-16
- 3.0.0-canary.4 (canary) — 2024-09-16
- 8.0.0-beta.7 — 2026-02-15
- 8.0.0-beta.6 — 2026-02-13
- 8.0.0-beta.5 — 2026-02-12
- 8.0.0-beta.4 — 2026-02-10
- 8.0.0-beta.3 — 2026-01-29
- 8.0.0-beta.2 — 2026-01-27
- 8.0.0-beta.1 — 2026-01-25
- 8.0.0-beta.0 — 2026-01-24
- 7.0.4 — 2026-01-19
- 7.0.3 — 2026-01-18
- 7.0.2 — 2025-10-14
- 7.0.1 — 2025-06-28
- … 422 more at https://npm.io/package/@faasjs/logger/versions

## README

# @faasjs/logger

FaasJS's logger module.

[![License: MIT](https://img.shields.io/npm/l/@faasjs/logger.svg)](https://github.com/faasjs/faasjs/blob/main/packages/logger/LICENSE)
[![NPM Version](https://img.shields.io/npm/v/@faasjs/logger.svg)](https://www.npmjs.com/package/@faasjs/logger)

## Install

```sh
npm install @faasjs/logger
```

## Usage

```typescript
import { Logger } from '@faasjs/logger'

const logger = new Logger()

logger.debug('debug message')
logger.info('info message')
logger.warn('warn message')
logger.error('error message')
```

### Support environment variables

- **FaasLog**: debug, info, warn, error (default: debug)
- **FaasLogSize**: 1000 (default: 1000, 0 for unlimited)
- **FaasLogMode**: plain, pretty (default: pretty)
- **FaasLogTransport**: true, false (default: true)

## Functions

- [colorfy](functions/colorfy.md)
- [formatLogger](functions/formatLogger.md)
- [getTransport](functions/getTransport.md)

## Classes

- [Logger](classes/Logger.md)
- [Transport](classes/Transport.md)

## Type Aliases

- [Level](type-aliases/Level.md)
- [LoggerMessage](type-aliases/LoggerMessage.md)
- [TransportHandler](type-aliases/TransportHandler.md)
- [TransportOptions](type-aliases/TransportOptions.md)

## Variables

- [Color](variables/Color.md)
- [LevelColor](variables/LevelColor.md)

---
_Source: https://npm.io/package/@faasjs/logger · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
