express-bunyan-logger
express-bunyan-logger copied to clipboard
Clearer error message if you use the library incorrectly
I was incorrectly doing
var bunyanLogger = require("express-bunyan-logger");
var express = require("express");
var app = express();
app.use(bunyanLogger);
when I really wanted:
app.use(bunyanLogger());
It's hard to tell what goes wrong in the first case. The app just hangs and never hits the callback. It would be nice if this library detected if opts
was actually an http.IncomingMessage
and returned an appropriate error.