Comparing version 0.3.1 to 0.3.2
@@ -6,2 +6,5 @@ # Bristol | ||
### v0.3.2 | ||
- Fix: Don't assume all errors have stack traces | ||
### v0.3.1 | ||
@@ -8,0 +11,0 @@ - Fix: Human formatter now outputs pretty-printed JSON when it encounters an |
@@ -79,5 +79,7 @@ /* | ||
function sanitize(str) { | ||
str = str.replace(/"/g, "'"); | ||
str = str.replace(/\s*\n\s*/g, ' | '); | ||
if (str) { | ||
str = str.replace(/"/g, "'"); | ||
str = str.replace(/\s*\n\s*/g, ' | '); | ||
} | ||
return str; | ||
} |
@@ -48,3 +48,3 @@ /* | ||
logUtil.safeMerge(obj, { | ||
stackTrace: elem.stack.replace(/\n\s*/g, "\n\t\t") | ||
stackTrace: sanitize(elem.stack) | ||
}); | ||
@@ -80,1 +80,7 @@ } | ||
}; | ||
function sanitize(str) { | ||
if (str) | ||
str.replace(/\n\s*/g, "\n\t\t"); | ||
return str; | ||
} |
@@ -49,3 +49,3 @@ /* | ||
logUtil.safeMerge(obj, { | ||
stackTrace: elem.stack.replace(/\s*[\n\r]+\s*/g, ' | ') | ||
stackTrace: sanitize(elem.stack) | ||
}); | ||
@@ -64,1 +64,7 @@ } | ||
}; | ||
function sanitize(str) { | ||
if (str) | ||
str.replace(/\s*[\n\r]+\s*/g, ' | '); | ||
return str; | ||
} |
@@ -82,4 +82,5 @@ /* | ||
function sanitize(str) { | ||
str = str.replace(/\s*\n\s*/g, ' | '); | ||
if (str) | ||
str = str.replace(/\s*\n\s*/g, ' | '); | ||
return str; | ||
} |
{ | ||
"name": "bristol", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Insanely configurable logging for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/Bristol.js", |
71813
1886