Skip to content

Commit

Permalink
Merge pull request TomFrost#4 from dannyrscott/master
Browse files Browse the repository at this point in the history
Error objects not being properly sent to log targets
  • Loading branch information
TomFrost committed Apr 28, 2014
2 parents 8a5b064 + fb97a54 commit cfe01e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Insanely configurable logging for Node.js

##ChangeLog

### v0.2.2
- Fix: Error objects not being properly sent to log targets

### v0.2.1
- Fix: Minor inaccuracies in README examples
- Fix: Options were improperly sent to target functions
Expand Down
2 changes: 1 addition & 1 deletion lib/Bristol.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Bristol.prototype.log = function(severity, elements) {
args[0] = logUtil.safeMerge(this._getOrigin(), this._getGlobals());
for (var i = 0; i < args.length; i++) {
var arg = this._transform(args[i]);
if (typeof arg == 'object')
if (typeof arg == 'object' && !(arg instanceof Error))
logUtil.safeMerge(objArgs, arg);
else
logElems.push(arg);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bristol",
"version": "0.2.1",
"version": "0.2.2",
"description": "Insanely configurable logging for Node.js",
"main": "lib/Bristol.js",
"scripts": {
Expand Down

0 comments on commit cfe01e7

Please sign in to comment.