@taotiejs/http

0.2.2 • Public • Published

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.

/@taotiejs/http/

    Package Sidebar

    Install

    npm i @taotiejs/http

    Weekly Downloads

    7

    Version

    0.2.2

    License

    MIT

    Unpacked Size

    5.71 kB

    Total Files

    5

    Last publish

    Collaborators

    • cweili