good-console

Console broadcasting for Good process monitor

BSD-3-Clause 34 个版本
安装
npm install good-console
yarn add good-console
pnpm add good-console
bun add good-console
README

good-console

good-console is a transform stream useful for turning good server events into formatted strings.

Build Status Current Version

Lead Maintainer: Open Position

Requires node v8 or above. Use version v7 of this module for node v6 support.

Usage

new GoodConsole([config])

Creates a new GoodConsole object with the following arguments:

  • [config] - optional configuration object with the following keys
    • format - MomentJS format string. Defaults to 'YYMMDD/HHmmss.SSS'.
    • utc - boolean controlling Moment using utc mode or not. Defaults to true.
    • color - a boolean specifying whether to output in color. Defaults to true.

Output Formats

Below are example outputs for the designated event type:

  • "ops" - 160318/013330.957, [ops] memory: 29Mb, uptime (seconds): 6, load: [1.650390625,1.6162109375,1.65234375]
  • "error" - 160318/013330.957, [error,event.tags] message: Just a simple error, stack: event.error.stack
  • "request" - 160318/013330.957, [request,event.tags] data: you made a request
  • "log" - 160318/013330.957, [log,event.tags] data: you made a default
  • "response" - 160318/013330.957, [response, event.tags] http://localhost:61253: post /data {"name":"adam"} 200 (150ms)
版本列表
8.0.0 2019-02-12
7.1.0 2018-02-15
7.0.1 2018-01-29
7.0.0 2018-01-17
6.4.1 2017-12-05
6.4.0 2017-02-08
6.3.1 2016-10-24
6.2.0 2016-12-08
6.1.3 2016-12-09
6.1.2 2016-05-27
6.1.1 2016-05-02
6.1.0 2016-04-21
6.0.0 2016-03-30
5.3.2 2016-04-21
5.3.1 2016-02-05
5.3.0 2016-01-22
5.2.0 2015-11-05
5.1.0 2015-09-21
5.0.3 2015-08-17
5.0.2 2015-06-04
5.0.1 2015-05-27
5.0.0 2015-04-08
4.1.0 2015-01-06
4.0.0 2014-12-23
3.1.2 2014-12-19
3.1.0 2014-12-19
3.0.2 2014-12-16
3.0.1 2014-12-10
3.0.0 2014-12-03
2.1.0 2014-12-03
2.0.1 2014-11-10
2.0.0 2014-11-04
1.0.0 2014-10-31
0.0.1 2014-10-31