Skip to content
Permalink
Browse files

lib: add 'pid' prefix in `internal/util`

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 <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
JungMinu authored and jasnell committed Nov 17, 2015
1 parent ca2e8b2 commit d01eb6882fcc1fcb1cfc01b7e474ab2b0e80b73c
Showing with 2 additions and 3 deletions.
  1. +1 −1 lib/internal/util.js
  2. +1 −2 test/sequential/test-deprecation-flags.js
@@ -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.
@@ -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');
});

0 comments on commit d01eb68

Please sign in to comment.
You can’t perform that action at this time.