# logging

> Lightweight informative modern console logging.

Latest version **4.2.0** (published 2025-06-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install logging
pnpm add logging
yarn add logging
bun add logging
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

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

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.2.0 |
| Published | 2025-06-08 |
| First published | 2011-03-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 20 |
| Dependencies | 3 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 55 |
| Author | Dylan Greene |
| Maintainers | dylang |

## Links

- npm: https://www.npmjs.com/package/logging
- Repository: https://github.com/dylang/logging
- Homepage: https://github.com/dylang/logging#readme
- Issues: https://github.com/dylang/logging/issues
- npm.io page: https://npm.io/package/logging

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^5.4.1
- [debug](https://npm.io/package/debug.md) ^4.4.1
- [nicely-format](https://npm.io/package/nicely-format.md) ^1.1.0

## Recent versions

- 4.2.0 (latest) — 2025-06-08
- 4.0.0-pr18.16 (pr) — 2025-06-07
- 4.0.0 — 2025-06-07
- 5.0.0-pr18.15 — 2025-06-07
- 5.0.0-pr18.14 — 2025-06-07
- 5.0.0-pr18.13 — 2025-06-07
- 5.0.0-pr18.20250607030242 — 2025-06-07
- 3.3.0 — 2021-02-05
- 3.2.0 — 2017-03-03
- 3.1.1 — 2017-02-21
- 3.1.0 — 2017-02-21
- 3.0.0 — 2017-02-18
- 2.0.21 — 2012-11-11
- 2.0.20 — 2012-11-10
- 2.0.19 — 2012-11-10
- … 17 more at https://npm.io/package/logging/versions

## README

# Logging [![Tests](https://github.com/dylang/logging/actions/workflows/test.yml/badge.svg)](https://github.com/dylang/logging/actions/workflows/test.yml)

> Lightweight informative modern console logging.

[![logging](screenshots/screenshot.png)](screenshots/screenshot.png)

## Install

```sh
pnpm add logging
```

## Features
* Simple.
* Log levels.
* Nice coloring.

## Usage

```js
// ESM only
import createLogger from 'logging';

const logger = createLogger('Feature');

logger.info('Interesting');
// -> [ Feature ] Interesting

logger.warn('Hmmm...', { details });
// -> [ WARNING Feature ] Hmmm... { details object }

logger.error('Not good.', 'Not good at all.', { err }, { context }, { etc });
// -> [ ERROR Feature ] Not good. Not good at all. { err } { context } ...

// uses the debug module, use DEBUG=* or DEBUG=FeatureName to see these items.
logger.debug('Interesting');
// -> [ Feature ] Interesting
```

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