Module: middlewares/requestLoggerMiddleware

Request Logger Middleware for Satoshi Showdown. This middleware integrates Morgan, a popular HTTP request logger, to log detailed information about incoming HTTP requests. It is instrumental for monitoring, debugging, and analyzing network activity within the application. By logging request data, this middleware assists in identifying issues, understanding traffic patterns, and maintaining robust network security.

Source:
See:

Requires

Methods

(inner) requestLoggerMiddleware() → {function}

Configures and returns Morgan middleware for detailed HTTP request logging. Utilizes a pre-defined 'combined' format that includes essential request details like method, URL, status, response time, etc. The logging output is directed to the application's central logging system via logUtil's stream interface, ensuring consistent log formatting and management. This middleware can be customized further to suit specific logging needs or preferences, such as different formats or conditional logging.

Source:
Returns:

Middleware function for HTTP request logging. Configured to use the 'combined' log format and the application's log stream.

Type
function