Permalink
Browse files

don't print an empty {} on empty objects

  • Loading branch information...
1 parent bb37fa3 commit df34d6002bff8a52c9b54bbee7279308da08567b @pquerna committed Oct 7, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/logmagic.js
View
@@ -247,7 +247,7 @@ exports.clearRewriter = function(func) {
/* This is just here for initial dev work, REMOVE ME */
exports.registerSink("console", function(modulename, level, message, obj) {
- if (obj) {
+ if (obj && Object.keys(obj).length !== 0) {
/* TODO: improve */
var fm = obj['full_message'] ? "\n " + obj['full_message'] : "";
obj['full_message'] = undefined;

0 comments on commit df34d60

Please sign in to comment.