Socket
Socket
Sign inDemoInstall

bole-console

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bole-console

Console formatter for the bole logger


Version published
Maintainers
1
Created
Source

bole-console

Console formatter for the bole logger

npm

Plugin for the bole logger. Formats and colorizes the JSON object and prints it to the stdout.

var bole = require('bole');
var boleConsole = require('bole-console');

var boleConsoleStream = boleConsole({
  timestamp: true,
  requestDetails: true
});

bole.output([
  { level: 'info', stream: boleConsoleStream }
]);

var log = bole('my-module');

Some outputs:

  • log.warn ({ foo: 'bar' }, 'baz')

    output1

  • log.error(new Error('foo'), 'bar')

    output2

  • log.info(request, 'foo')

    output3

module([options]) : Writable
Returns a new Writable stream instance.

Options:

  • timestamp - Boolean
    Includes the ISO string of the current time. Default false.
  • hostname - Boolean
    Includes the hostname of the current user. Default false.
  • pid - Boolean
    Includes the pid of the current process. Default false.
  • indent - Number
    Number of spaces for each level when objects are formatted. Default 2.
  • colors - Boolean
    Prints the message with colors. Default true.
  • requestDetails - Boolean
    Includes some details about the request such as headers and remote socket. Default false.

Keywords

FAQs

Package last updated on 17 Jan 2015

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