Answers for "winston exclude routes"

0

winston exclude routes

var routeWhitelist = ['/foo', '/bar'];

app.use(expressWinston.logger({
  transports: [new winston.transports.Console()],
  ignoreRoute: function (req, res) {
    return routeWhitelist.indexOf(req.originalUrl || req.url) === -1;
  }
}));
Posted by: Guest on September-15-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language