koa-req-trace

0.0.2 • Public • Published

koa-req-trace

koa请求日志打印

Installation

$ npm install koa-req-trace

API

var koa = require('koa');
var app = koa();
app.use(require('koa-req-trace')(options));

Options

  • console {boolean} 打印到控制台, 默认true
  • appendFile {boolean} 输出到文件,默认true
  • dist {string} 文件路径,默认'./log.txt'

Example

 
var app = require('koa')();
var koaReqTrace = require('koa-req-trace');
app.use(koaReqTrace({
    console: false,
    appendFile: true,
    dist: path.join(__dirname, "logger.txt")
}));
 

Support

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i koa-req-trace

Weekly Downloads

3

Version

0.0.2

License

MIT

Last publish

Collaborators

  • imkelen