0.0.3 • Published 2 years ago

@teammaestro/express-http-logger v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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