FoalTS / foal

Full-featured Node.js framework, with no complexity. 🚀 Simple and easy to use, TypeScript-based and well-documented.
https://foalts.org/
MIT License
1.88k stars 137 forks source link

How to get the response time and log it using winston logger in foalts #1204

Closed kishore-rajendran-zoomrx closed 8 months ago

kishore-rajendran-zoomrx commented 1 year ago

I need to know how to log the method request-path response-time just like in morgan to be logged in winston logger.

or if I could get the response time from the foalts I can use it to log it manually.

LoicPoullain commented 8 months ago

Hi @zrx-kishore-rajendran 👋

Foal version 4.1 comes with a new advanced logging system and logs the response time upon an HTTP request: https://foalts.org/docs/common/logging/. This version will probably fix your issue. 👍