{"library":"logger-request","title":"HTTP Request Logger Middleware","description":"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.","language":"javascript","status":"abandoned","last_verified":"Thu Apr 23","install":{"commands":["npm install logger-request"],"cli":null},"imports":["import logger from 'logger-request'","const logger = require('logger-request'); app.use(logger(options));"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const express = require('express');\nconst logger = require('logger-request');\nconst app = express();\n\n// Configure the logger to write to 'app.log' and also display to console\napp.use(logger({\n  filename: 'app.log',\n  console: true,\n  daily: true, // Rotate log file daily\n  winston: {\n    level: 'info',\n    json: true,\n    timestamp: true\n  },\n  custom: {\n    pid: true, // Log process ID\n    referer: true, // Log HTTP referer header\n    agent: true // Log user-agent header\n  }\n}));\n\napp.get('/', (req, res) => {\n  res.send('Hello World!');\n});\n\napp.listen(3000, () => {\n  console.log('Server running on port 3000');\n});\n","lang":"javascript","description":"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}