logging

Lightweight informative modern console logging.

MIT 32 个版本
安装
npm install logging
yarn add logging
pnpm add logging
bun add logging
README

Logging Tests

Lightweight informative modern console logging.

logging

Install

pnpm add logging

Features

  • Simple.
  • Log levels.
  • Nice coloring.

Usage

// 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
版本列表
5.0.0-pr18.15 2025-06-07
5.0.0-pr18.14 2025-06-07
5.0.0-pr18.13 2025-06-07
4.2.0 2025-06-08
4.0.0 2025-06-07
4.0.0-pr18.16 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
2.0.18 2012-09-27
2.0.16 2012-03-24
2.0.15 2012-03-21
2.0.14 2011-12-14
2.0.13 2011-11-23
2.0.12 2011-10-28
2.0.11 2011-09-27
2.0.10 2011-08-29
2.0.9 2011-08-01
2.0.8 2011-04-18
2.0.6 2011-03-02
2.0.4 2011-03-02
2.0.3 2011-03-02
2.0.2 2011-03-02
2.0.1 2011-03-02
2.0.0 2011-03-02
0.0.0 2011-12-14