📜  winston 排除路由 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:51.283000             🧑  作者: Mango

代码示例1
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;
  }
}));