Fix console formatter to recognize json properly

This commit is contained in:
Marco Rogers 2010-07-15 23:36:35 -07:00 committed by Ryan Dahl
parent dcd41ca864
commit 1662c37c40

View File

@ -195,7 +195,7 @@ function format (f) {
var i = 1;
var args = arguments;
if (!(f instanceof String)) f = String(f);
return f.replace(/%([sdf])/g, function (x) {
return f.replace(/%([sdj])/g, function (x) {
switch (x) {
case '%s': return args[i++];
case '%d': return args[i++].toString();