mirror of https://github.com/nodejs/node.git
Fix console formatter to recognize json properly
parent
dcd41ca864
commit
1662c37c40
|
@ -195,7 +195,7 @@ function format (f) {
|
||||||
var i = 1;
|
var i = 1;
|
||||||
var args = arguments;
|
var args = arguments;
|
||||||
if (!(f instanceof String)) f = String(f);
|
if (!(f instanceof String)) f = String(f);
|
||||||
return f.replace(/%([sdf])/g, function (x) {
|
return f.replace(/%([sdj])/g, function (x) {
|
||||||
switch (x) {
|
switch (x) {
|
||||||
case '%s': return args[i++];
|
case '%s': return args[i++];
|
||||||
case '%d': return args[i++].toString();
|
case '%d': return args[i++].toString();
|
||||||
|
|
Loading…
Reference in New Issue