Skip to content

taotiejs/taotie-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

HTTP logger of Taotie, base on pino-http

Resources

License

Stars

Watchers

Forks

Packages

No packages published