@teamhive/express-http-logger
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

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 @teamhive/express-http-logger

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

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

... The rest of your express logic

Readme

Keywords

none

Package Sidebar

Install

npm i @teamhive/express-http-logger

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

5.44 kB

Total Files

13

Last publish

Collaborators

  • emrado
  • granttw
  • jpinkster
  • sbannigan
  • jgibson55