This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

luvely

0.10.3 • Public • Published

luvely

A human readable format for bunyan's JSON logging.

Why?

Bunyan is the best logging solution for node applications. By default, it logs everything in JSON format. It does come with a handy CLI for formatting human readable logs but it's a separate process. Luvely gives you a stream you can use IN ADDITION to your JSON logs. I highly recommend using bunyans JSON formatted logs for machine consumable purposes but machines aren't the ones reading stdout - you are. Use luvely for stdout and JSON everywhere else (files, APIs etc). You get the best of both worlds without having to pipe your process through a script.

What does it look like?

example

If you enabled the bunyan src:true options, you'll get that information for errors and up src-example

Install

$ npm install luvely --save

Quick Start

const luvely = require('luvely');
const appName = 'myApp';
const luvelyStream = luvely();
 
const log = bunyan.createLogger({
  name: appName,
  stream: luvelyStream,
  level: 'trace'
});

Recommended Usage

const luvely = require('luvely');  
const appName = 'myApp';
 
const log = bunyan.createLogger({
  streams: [
    {
      level: 'info',
      stream: luvely() // this will go to stdout for humans      
    },
    {
      level: 'info',
      stream: someFileOrThirdPartyStream() // this will be JSON for machines
    }
  ]
});

Tests

$ npm test

Package Sidebar

Install

npm i luvely

Weekly Downloads

5

Version

0.10.3

License

MIT

Last publish

Collaborators

  • recursivefunk