Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rrainn/express-middleware-log

📦 NPM Package - Allows you to quickly log things using Express.js middleware
https://github.com/rrainn/express-middleware-log

express-middleware npm-package

Last synced: 23 days ago
JSON representation

📦 NPM Package - Allows you to quickly log things using Express.js middleware

Awesome Lists containing this project

README

        

# express-middleware-log [![NPM version](https://badge.fury.io/js/express-middleware-log.svg)](http://badge.fury.io/js/express-middleware-log) [![Known Vulnerabilities](https://snyk.io/test/github/rrainn/express-middleware-log/badge.svg)](https://snyk.io/test/github/rrainn/express-middleware-log) [![Dependencies](https://david-dm.org/rrainn/express-middleware-log.svg)](https://david-dm.org/rrainn/express-middleware-log) [![Dev Dependencies](https://david-dm.org/rrainn/express-middleware-log/dev-status.svg)](https://david-dm.org/rrainn/express-middleware-log?type=dev)

### Install

npm install --save express-middleware-log

### Usage

const logger = require("express-middleware-log"); // Include express-middleware-log in your application

app.use(logger("Before Middleware 1")); // Print "Before Middleware 1" at this point
app.use(logger(req => req.path)); // Print req.path at this point