good-console, 控制台报告,用于良好的进程监控.zip

  • v0_655725
    了解作者
  • 7.5KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-13 14:26
    上传日期
good-console, 控制台报告,用于良好的进程监控 良好的控制台good-console 是一个转换流,用于将良好的服务器事件转换为格式字符串。 领导维护者: Adam Bretz 。用法 new GoodConsole([config])使用以下参数创建一个新的GoodC
good-console.zip
  • good-console-master
  • .travis.yml
    147B
  • package.json
    545B
  • test
  • index.js
    18.4KB
  • .npmignore
    22B
  • LICENSE.md
    1.5KB
  • .gitignore
    108B
  • CHANGELOG.md
    370B
  • lib
  • index.js
    4.5KB
  • README.md
    1.5KB
内容介绍
<a href="http://hapijs.com" rel='nofollow' onclick='return false;'><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a> # @hapi/good-console `good-console` is a transform stream useful for turning [good](https://github.com/hapijs/good) server events into formatted strings. [![Build Status](https://travis-ci.org/hapijs/good-console.svg?branch=master)](http://travis-ci.org/hapijs/good-console) ## Usage ## `new GoodConsole([config])` Creates a new GoodConsole object with the following arguments: - `[config]` - optional configuration object with the following keys - `format` - [MomentJS](http://momentjs.com/docs/#/displaying/format/) format string. Defaults to 'YYMMDD/HHmmss.SSS'. - `utc` - boolean controlling Moment using [utc mode](http://momentjs.com/docs/#/parsing/utc/) 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)
评论