Isomorphic request logging for Rill. With colors!
<-- 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
npm install @rill/logger
const app = require('rill')()
const logger = require('@rill/logger')
app.use(logger())
{
group: false // If true, will use console.group instead of log. (Shims in node)
}
Recommended that you .use()
this middleware near the top to "wrap" all subsequent middleware.
- Use
npm test
to run tests.
Please feel free to create a PR!