Socket
Socket
Sign inDemoInstall

express-light-logger

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    express-light-logger

Express middleware which logs requests to stdout


Version published
Maintainers
1
Install size
1.61 kB
Created

Readme

Source

Express Light Logger

Basic logger for Express.

Installation

npm install express-light-logger

Example

var express = require('express');
var app = express();

var logger = require('express-light-logger');

app.use(logger());

app.get('/', function(req, res) {

  setTimeout(function() {
    res.write('Responding in 5 seconds');
    res.end();
  }, 5000);

}).listen(8080, function() {
  console.log('Listening!');
});

Prints:

Request started

Response sent in 5002.816 milliseconds

Keywords

FAQs

Last updated on 25 Jul 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc