koa-logger-adapter
v1.1.0
Published
Logging middleware for koa
Downloads
3
Readme
koa-logger
logger middleware for koav2.
Wrapper
koa-logger
adapt production enveriment
Example
const logger = require('koa-logger-adapter')
const Koa = require('koa')
const option = {
stream: fs.createWriteStream('./logs/access.log'), //setup log stream(default is process.stdout)
color: true //enable color output
}
const app = new Koa()
app.use(logger(option))
Notes
Recommended that you .use()
this middleware near the top
to "wrap" all subsequent middleware.
License
MIT