/request-logger

Simple middleware for logging your incoming express requests

Primary LanguageJavaScriptCreative Commons Zero v1.0 UniversalCC0-1.0

Package express-mini-logger

Simple middleware for logging your incoming express requests

Usage

CommonJS:

const express = require('express');
const requestLogger = require('express-mini-logger');

const app = express();

app.use(requestLogger({
    printBody: true
}));

ESModule:

import express from 'express';
import requestLogger from 'express-mini-logger';

const app = express();

app.use(requestLogger({
    printBody: true
}));

Result:

GET / <empty> 200 4ms
POST / { hello: 'world!' } 201 5ms

Thanks

Pay me a coffee:

nano_3ntf6crkan6114rfb39d51udqdw4mrbt1x7n8uphx44ojhxcjo3exhk6dsme

nano_3ntf6crkan6114rfb39d51udqdw4mrbt1x7n8uphx44ojhxcjo3exhk6dsme