Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

luvely

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

luvely

Lovely formatting for bunyan

  • 0.10.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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'
});
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

Keywords

FAQs

Package last updated on 08 Jan 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc