镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Merged
thebigredgeek merged 2 commits into
v3from
unknown repository
Jan 4, 2017
Merged

thebigredgeek merged 2 commits into
v3from
unknown repository

Conversation

@gtjoseph

@gtjoseph gtjoseph commented Dec 30, 2016 •

Copy link
Copy Markdown
Contributor

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.

Also, 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.

gtjoseph and others added 2 commits December 30, 2016 07:22
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.
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');
@coveralls

coveralls commented Dec 30, 2016 •

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 74.419% when pulling 6302bbc on f5eng:for-visionmedia-v3 into dade81d on visionmedia:v3.

@coveralls

coveralls commented Dec 30, 2016 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.4%) to 74.046% when pulling a4dcf8b on f5eng:for-visionmedia-v3 into dade81d on visionmedia:v3.

@gtjoseph gtjoseph changed the title Make millisecond timer namespace specific Make millisecond timer namespace specific and allow "always enabled' output Dec 30, 2016
@gtjoseph gtjoseph changed the title Make millisecond timer namespace specific and allow "always enabled' output Make millisecond timer namespace specific and allow 'always enabled' output Dec 30, 2016
@thebigredgeek
thebigredgeek merged commit fc06894 into debug-js:v3 Jan 4, 2017
thebigredgeek pushed a commit that referenced this pull request Apr 12, 2017
…output (#408)

* 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.

* 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');
TooTallNate pushed a commit that referenced this pull request Aug 8, 2017
…output (#408)

* 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.

* 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');
TooTallNate pushed a commit that referenced this pull request Aug 8, 2017
…output (#408)

* 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.

* 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');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants