@teammaestro/express-http-logger

Basic logger for tracking http requests in an Express app.

Usage no npm install needed!

<script type="module">
  import teammaestroExpressHttpLogger from 'https://cdn.skypack.dev/@teammaestro/express-http-logger';
</script>

README

express-http-logger

Basic logger for tracking http requests in an Express app.

Install

All you need to do is npm install the package, configure a new instance with your log4js logger, and run the middleware. Make sure you setup the middleware before any of your routes are defined.

npm i @teammaestro/express-http-logger

import * as express from 'express';
import * as log from 'log4js';
import { ExpressHttpLogger } from '@teammaestro/express-http-logger';

const app: express.Express = express();
const logger = log.getLogger();
app.use(new ExpressHttpLogger(logger).log());

... The rest of your express logic