Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Commit

Permalink
fix: don't log buffer data into error log
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-horse committed Jan 18, 2015
1 parent 00056d3 commit 8623e64
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,9 @@ logger.syncError =function () {
if (typeof args[0] === 'string') {
args[0] = util.format('[%s][%s] ', utility.logDate(), process.pid) + args[0];
}
// remove err.data when data is buffer
if (args[0] instanceof Error && Buffer.isBuffer(args[0].data)) {
delete args[0].data;
}
logger.dist_sync_error.apply(logger, arguments);
};

0 comments on commit 8623e64

Please sign in to comment.