Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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;
  }
}));
Source by github.com #
 
PREVIOUS NEXT
Tagged: #winston #exclude #routes
ADD COMMENT
Topic
Name
5+7 =