Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

debug-logfmt

Kikobeats175.6kMIT1.2.3

debug module using logfmt format

debug, debugger, herokubunyan, log, logfmt, logger, logging, winston

readme

debug-logfmt

Highlights

  • Based on debug, use DEBUG for enable/disable logging.
  • Expose info, warn and error logging levels, inspired from RFC 5424.
  • Format messages using Heroku logfmt syntax.

Install

$ npm install debug-logfmt --save
const debug = require('debug-logfmt')

const log = debug('metascraper')

log.debug('retry', { url: req.url })
log.info('done', { time: ms('1 hour') })
log.warn('token expired', { timestamp: Date.now() })
log.error('whoops', { message: error.message })

API

debug(env, [options])

env

Required
Type: string

The env variable name to use for enabling logging using DEBUG.

options

levels

Type: array
Default: ['debug', 'info', 'warn', 'error']

The log levels available.

License

debug-logfmt © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.

kikobeats.com · GitHub Kiko Beats · X @Kikobeats

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.2.5 (2025-01-12)

1.2.4 (2025-01-10)

1.2.3 (2024-09-13)

Bug Fixes

1.2.2 (2024-01-16)

1.2.1 (2024-01-16)

1.2.0 (2023-10-08)

Features

1.1.0 (2023-10-07)

Features

  • don't print diff information (d874c16)

1.0.4 (2019-10-07)

1.0.3 (2019-08-23)

1.0.2 (2019-06-03)

Bug Fixes

  • package: update logfmt to version 1.3.2 (90640f6)

1.0.1 (2019-05-21)

1.0.0 (2019-05-21)

0.0.1 (2019-05-21)

Bug Fixes

Build System

  • no-release: first commit (fdea7ad)