koa-logger-md

0.1.1 • Public • Published

koa-logger-md

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-04-27T09:18:01.344Z]<-- GET /
[2017-04-27T09:18:02.344Z]--> GET / 200 835ms 746b
[2017-04-27T09:18:03.344Z]<-- GET /
[2017-04-27T09:18:04.344Z]--> GET / 200 960ms 1.9kb
[2017-04-27T09:18:05.344Z]<-- GET /users
[2017-04-27T09:18:06.344Z]--> GET /users 200 357ms 922b
[2017-04-27T09:18:07.344Z]<-- GET /users?page=2
[2017-04-27T09:18:09.344Z]--> GET /users?page=2 200 466ms 4.66kb

Installation

$ npm install koa-logger-md

Example

const logger = require('koa-logger-md')
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-logger-md

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • michealdean