@etrainu/express-logger-middleware

Express request logging middleware built using bunyan and config.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@etrainu/express-logger-middleware
2.1.02 months ago4 years agoMinified + gzip package size for @etrainu/express-logger-middleware in KB

Readme

etrainu-logger-middleware
To be used with an express router.
// Sample use
import * as config from 'config';
import logMiddleware from './logger';

const bunyan = {
  name: 'appName', // config.get('param')
  streams: [{
    level: 'logLevel',
    stream: process.stdout,
  }],
};

/** 
  router.use(
    logMiddleware({ config: 'test', logger: bunyan, });
  );
*/