Skip to content

Commit

Permalink
lib: add 'pid' prefix in internal/util
Browse files Browse the repository at this point in the history
This PR improves `prefix` in `util` that we've agreed on
#3833
(separate code for javascript to move the printing function
to C++ directly)

PR-URL: #3878
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
JungMinu authored and jasnell committed Nov 20, 2015
1 parent ca2e8b2 commit d01eb68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/internal/util.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const prefix = '(node) ';
const prefix = `(${process.release.name}:${process.pid}) `;

// All the internal deprecations have to use this function only, as this will
// prepend the prefix to the actual message.
Expand Down
3 changes: 1 addition & 2 deletions test/sequential/test-deprecation-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ execFile(node, normal, function(er, stdout, stderr) {
console.error('normal: show deprecation warning');
assert.equal(er, null);
assert.equal(stdout, '');
assert.equal(stderr, '(node) util.debug is deprecated. Use console.error ' +
'instead.\nDEBUG: This is deprecated\n');
assert(/util\.debug is deprecated/.test(stderr));
console.log('normal ok');
});

Expand Down

0 comments on commit d01eb68

Please sign in to comment.