koa-logger
<-- req GET /dist/web.app.js 2018-10-29 20:51:05
--> res GET /dist/web.app.js 200 3ms 10.26mb
<-- req GET /dist/web.27.js 2018-10-29 20:51:05
--> res GET /dist/web.27.js 200 1ms 29.82kb
<-- req GET /dist/web.57.js 2018-10-29 20:51:05
--> res GET /dist/web.57.js 200 2ms 36.16kb
Installation
$ npm install koa-logger
Example
const logger = const Koa = const app = app
Notes
Recommended that you .use()
this middleware near the top
to "wrap" all subsequent middleware.
Use Custom Transporter
const logger = const Koa = const app = app
or
app
Param str
is output string with ANSI Color, and you can get pure text with other modules like strip-ansi
Param args
is a array by [format, method, url, status, time, length]
License
MIT