Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 399 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 399 Bytes

Usage

const bunyan = require('bunyan');
const bunyanRequest = require('micro-bunyan-request');

const logger = bunyan.createLogger({ name: 'My App' });
const logreq = bunyanRequest({
  logger: logger,
  headerName: 'x-request-id'
});

module.exports = logreq(async (req, res) => `Hello world`);

Credits

Adapted: vvo/bunyan-request for micro