Skip to content

Commit d01eb68

Browse files
JungMinujasnell
authored andcommitted
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 <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent ca2e8b2 commit d01eb68

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/internal/util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

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

55
// All the internal deprecations have to use this function only, as this will
66
// prepend the prefix to the actual message.

test/sequential/test-deprecation-flags.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ execFile(node, normal, function(er, stdout, stderr) {
1616
console.error('normal: show deprecation warning');
1717
assert.equal(er, null);
1818
assert.equal(stdout, '');
19-
assert.equal(stderr, '(node) util.debug is deprecated. Use console.error ' +
20-
'instead.\nDEBUG: This is deprecated\n');
19+
assert(/util\.debug is deprecated/.test(stderr));
2120
console.log('normal ok');
2221
});
2322

0 commit comments

Comments
 (0)