Socket
Socket
Sign inDemoInstall

debug-logfmt

Package Overview
Dependencies
21
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    debug-logfmt

debug module using logfmt format


Version published
Weekly downloads
8.7K
decreased by-20.33%
Maintainers
1
Install size
886 kB
Created
Weekly downloads
 

Readme

Source

debug-logfmt

Highlights

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 · Twitter @Kikobeats

Keywords

FAQs

Last updated on 16 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc