5.2.1 • Published 8 years ago

good-console-filtered v5.2.1

Weekly downloads
2
License
ISC
Repository
-
Last release
8 years ago

good-console

Console broadcasting for Good process monitor that ignores any route ending with /health

Build StatusCurrent Version

Lead Maintainer: Adam Bretz

Usage

good-console is a good reporter implementation to write hapi server events to the console.

GoodConsole(events, [config])

Creates a new GoodConsole object with the following arguments:

  • events - an object of key value pairs. - key - one of the supported good events indicating the hapi event to subscribe to - value - a single string or an array of strings to filter incoming events. "*" indicates no filtering. null and undefined are assumed to be "*"
  • [config] - optional configuration object with the following available keys - format - MomentJS format string. Defaults to 'YYMMDD/HHmmss.SSS'. - utc - boolean controlling Moment using utc mode or not. Defaults to true.

Good Console Methods

goodconsole.init(stream, emitter, callback)

Initializes the reporter with the following arguments:

  • stream - a Node readable stream that will be the source of data for this reporter. It is assumed that stream is in objectMode.
  • emitter - an event emitter object.
  • callback - a callback to execute when the start function has complete all the necessary set up steps and is ready to receive data.

Output Formats

Below are example outputs for the designated event type: