pino-inspector
npm i pino-inspector

pino-inspector

Send your pino logs to the node inspector!

by pinojs

0.1.0 (see all)License:MITTypeScript:Not Found
npm i pino-inspector
Readme

pino-inspector

Build Status

Send your pino logs to the node inspector! This project piggybacks on pino-pretty. It will send formatted logs to the terminal, and their JS version to the console.

This module requires Node only on 10.12.0+.

Install

npm i pino pino-inspector

Usage

'use strict'

const pinoInspector = require('.')

const pino = require('pino')({
  level: 'debug',
  prettyPrint: true,
  prettifier: pinoInspector
})

pino.info({ my: 'obj' }, 'hello')

setInterval(function () {
  pino.info('a second has passed')
}, 1000)

setInterval(function () {
  pino.debug('750 millis has passed')
}, 750)

setInterval(function () {
  pino.warn('1500 millis has passed')
}, 2000)

setInterval(function () {
  pino.error('2 seconds has passed')
}, 2000)

TODO

  • unit tests, turns out that connecting to the inspector is hard
  • better format for the browser

License

MIT

Downloads/wk

161

GitHub Stars

11

LAST COMMIT

1yr ago

MAINTAINERS

1

CONTRIBUTORS

4

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.1.0
latest
4yrs ago
No alternatives found
No tutorials found
Add a tutorial