@oada/pino-debug
TypeScript icon, indicating that this package has built-in type declarations

3.10.0 • Public • Published

@oada/pino-debug

Version code style: prettier License

A library for handle making debug.js work automatically with pino.

Usage

Import this library, then just use debug.js as normal.

// You probably want this to be your first import in your main file
import '@oada/pino-debug';

// Then just use debug.js as normal
import debug from 'debug';

const info = debug('example:info');

// Pass a context object and a message string
info({/* ...context */});, 'Hello world!');

Advanced Usage

The pino API can still be accessed too.

// If you want to access pino, it is exported by this lib
import { pino } from '@oada/pino-debug';

/**
 * See the pino API for what you can do
 * !!! DO NOT import pino directly !!!
 */
const logger = pino({
  /* ...options */
});

Readme

Keywords

none

Package Sidebar

Install

npm i @oada/pino-debug

Weekly Downloads

22

Version

3.10.0

License

ISC

Unpacked Size

25.8 kB

Total Files

8

Last publish

Collaborators

  • sanoel
  • serviopalacios
  • aultac
  • awlayton
  • oadao
  • tarakawa
  • cyrusbowman
  • abalmos