Tags? #28

Closed
AlexeyKupershtokh opened this Issue Nov 9, 2012 · 1 comment

Projects

None yet

2 participants

@AlexeyKupershtokh

For example, on a running server only one entity has an issue.
Let's say in a game one only quest has some bug.
And we have a code something like this:

var debug = require('debug')('quests');
for (var i in quests) {
  // check if the quest completed
  if (...) {
    debug("quest " + i + "is completed");
  }
}

This would capture all quests.

I could create require('debug')('quest_' + i); for each quest...

But what I would really like is to be able add some tags to debug calls to be able to dynamically filter debug messages by them.

debug({quest: i, uid: uid, }, "quest " + i + "is completed");

and then filter them by either uid or quest somehow.

Any ideas how to do this?

@tj
Sloth member
tj commented Nov 14, 2012

out of scope for this project IMO, jog logs json though, maybe that would be a better alternative?

@tj tj closed this Apr 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment