koa-logger4miwoy

1.0.0 • Public • Published

koa-logger

npm version build status

Development style logger middleware for koa.

Notice: koa-logger@2 supports koa@2; if you want to use this module with koa@1, please use koa-logger@1.

[2017-03-21T07:07:27.661Z] <-- GET /
[2017-03-21T07:07:27.661Z] --> GET / 200 835ms 746b
[2017-03-21T07:07:27.661Z] <-- GET /
[2017-03-21T07:07:27.661Z] --> GET / 200 960ms 1.9kb
[2017-03-21T07:07:27.661Z] <-- GET /users
[2017-03-21T07:07:27.661Z] --> GET /users 200 357ms 922b
[2017-03-21T07:07:27.661Z] <-- GET /users?page=2
[2017-03-21T07:07:27.661Z] --> GET /users?page=2 200 466ms 4.66kb

Installation

$ npm install koa-logger

Example

const logger = require('koa-logger')
const Koa = require('koa')

const app = new Koa()
app.use(logger())

Notes

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

License

MIT

Package Sidebar

Install

npm i koa-logger4miwoy

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • miwoy