How to use the log function from winston

Find comprehensive JavaScript winston.log code examples handpicked from public code repositorys.

12
13
14
15
16
17
18
19
20
21
  }
});

// index
app.get('/profile', app.ensureAuthenticated, function(req, res) {
  winston.log("info", "GET /profile");

  if (typeof req.user.bitbucket !== "undefined") {
    models.log.find({user: req.user._id}, function(err, logs) {
      if (err) {
fork icon7
star icon21
watch icon2

+ 15 other calls in file

368
369
370
371
372
373
374
375
376
  var userList = JSON.parse(users);
  userList.forEach(async (u) => {
    try {
      await User.create(u);
    } catch (error) {
      logger.log(error.message);
    }
  });
}
fork icon0
star icon1
watch icon0

+ 2 other calls in file