@taotiejs/http
v0.2.2
Published
HTTP logger of Taotie, base on pino-http
Downloads
11
Maintainers
Readme
Taotie HTTP
HTTP logger of Taotie, base on pino-http.
It outputs meaningful log message:
GET /api 200 10ms
Installation
npm install @taotiejs/http
Usage
All usages as same as pino-http.
More Options
customLogFormatter
options.customLogFormatter = function(req, res) {
return [{
res,
responseTime: res.responseTime,
}, `${req.method} ${req.url} ${res.statusCode} ${res.responseTime}ms`]
}
Server
You may use @taotiejs/server
for log collecting and querying.