@taotiejs/http

HTTP logger of Taotie, base on pino-http

Usage no npm install needed!

<script type="module">
  import taotiejsHttp from 'https://cdn.skypack.dev/@taotiejs/http';
</script>

README

Taotie HTTP

npm npm downloads license

github

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.