Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make millisecond timer namespace specific and allow 'always enabled' output #408

Merged
merged 2 commits into from Jan 4, 2017
Merged

Commits on Dec 30, 2016

  1. Make millisecond timer namespace specific

    When debugging node apps, I find it much more useful for the
    millisecond timer to be relative to last message from the same
    namespace instead of any message. This is especially true when I'm
    debugging across multiple libraries or multiple levels in the same
    module and I'm interested in seeing all the messages but also need to
    compare times from specific levels.
    gtjoseph committed Dec 30, 2016
    Copy the full SHA
    6302bbc View commit details
    Browse the repository at this point in the history
  2. Enable 'always enabled' output

    Having to deal with 2 different logging mechanisms, one for debugging
    and one for normal output, can be a nuisance.  It would be much easier to
    always use the same facility and semantics for both.  This patch allows
    an 'always enabled' namespace to be specified by appending a single '*'
    to the namespace name.
    
    var alwaysOn = require('debug')('normal:messages*');
    alwaysOn('This will always display regardless of DEBUG');
    gtjoseph committed Dec 30, 2016
    Copy the full SHA
    a4dcf8b View commit details
    Browse the repository at this point in the history