connect-logger is a minimalistic Connect/Express middleware designed for logging incoming HTTP requests. Released in 2013, its latest and only version is `0.0.1`. The package primarily offers basic request logging with customizable format strings for date, status, method, URL, route, and response time. It allows for moment.js-style date formatting, though `moment` itself is not a direct dependency but rather an implied style guide. Due to its age and lack of updates, it is not compatible with modern Node.js versions, contemporary Express APIs, or ES Modules. Its lack of maintenance makes it unsuitable for production use in current environments, as it predates many standard logging practices and security considerations now common in web development.
npm install connect-loggerVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to integrate connect-logger into an Express application, showing both default and custom logging options.
Migrate to a maintained logging middleware such as `morgan`, `pino-http`, or `winston-express`.
Use CommonJS `require()` syntax. However, it's strongly recommended to use a modern, actively maintained logger that supports ES Modules if your project is ESM-based.
Immediately replace this package with a well-maintained and audited logging solution. Do not use it in production or any environment handling sensitive data.
If migrating, consider modern date libraries like `date-fns` or the built-in `Intl.DateTimeFormat`.
The only fix is to replace `connect-logger` with a modern, maintained logging middleware like `morgan` or `pino-http`.
Use `const connectLogger = require('connect-logger');`. However, given the package's age, consider migrating to a modern logging solution.No dependency data recorded yet.