logger-request is an HTTP request logging middleware for Node.js, primarily designed for Express applications. It leverages the Winston logging library (specifically Winston v2.3.1 as of its last release, 3.8.0) to provide flexible output options including file logging, console output, and integration with other Winston transports like MongoDB. Key features include daily log rotation, customizable log fields such as process ID, referrer, authentication status, transfer rates, and user agent. The package reached its latest version, 3.8.0, in 2017, and has not received updates since, making it incompatible with modern Node.js versions and the significantly evolved Winston v3+ ecosystem. Its release cadence was active in the mid-2010s but has ceased, rendering it effectively unmaintained.
npm install logger-requestVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic Express integration, setting up the middleware to log requests to both a daily rotating file (`app.log`) and the console with custom fields.
Downgrade Winston to a compatible v2.x version if you must use this package, or migrate to a modern logging solution that supports Winston v3+.
Consider migrating to a currently maintained HTTP request logger middleware for modern Node.js environments.
Understand that `options.deprecated` controls log timing, not feature deprecation. Use `false` for default behavior (logging on listener) or `true` for logging after response ends.
Ensure that your `node_modules` only contains `winston@2.x` if you intend to use `logger-request`. If your project requires Winston v3+, you must migrate away from `logger-request`.
Install winston: `npm install winston@2` (to match the version `logger-request` expects) or `npm install winston` if you are using an older npm that resolves peer dependencies automatically.
Verify that `logger-request` is correctly installed via `npm install logger-request`. Check for any installation errors or conflicts in your `node_modules` directory.