koa-mag
Logging middleware for koa using mag
Last updated a year ago by justmoon .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install koa-mag 
SYNC missed versions from official npm registry.

koa-mag

Development style logger middleware for koa 2.x using mag.

<-- GET /
--> GET / 200 835ms 746b
<-- GET /
--> GET / 200 960ms 1.9kb
<-- GET /users
--> GET /users 200 357ms 922b
<-- GET /users?page=2
--> GET /users?page=2 200 466ms 4.66kb

Installation

$ npm install koa-mag

Example

var logger = require('koa-mag')
var koa = require('koa')

var app = koa()
app.use(logger())

Options

  • mag - Provide your own instance of mag. Not generally needed, but useful in some circumstances to fix inheritance issues.

Notes

Recommended that you .use() this middleware near the top to "wrap" all subsequent middleware.

License

MIT

Current Tags

  • 2.0.0                                ...           latest (a year ago)

7 Versions

  • 2.0.0                                ...           a year ago
  • 1.1.0                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 10
Last Day 0
Last Week 7
Last Month 0
Dependencies (3)
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |