good-console-logfmt
v1.1.0
Published
Console broadcasting for Good process monitor, using the logfmt format
Downloads
140
Readme
good-console-logfmt
Console broadcasting for Good process monitor, using logfmt formatting
Lead Maintainer: Christopher De Cairos
Usage
good-console-logfmt is a good reporter implementation to write hapi server events to the console. It uses the logfmt package to format log output.
GoodConsoleLogfmt(events, [config])
Creates a new GoodConsoleLogfmt 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 tovalue- a single string or an array of strings to filter incoming events. "*" indicates no filtering.nullandundefinedare assumed to be "*"
[config]- optional configuration object with the following available keysutc- boolean controlling Moment using utc mode or not. Defaults totrue.
Good Console Logfmt Methods
goodconsolelogfmt.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 thatstreamis inobjectMode.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.
