Permalink
Browse files

Do not spend the effort on a stack trace if omitCallerDetails is set

  • Loading branch information...
1 parent c124419 commit 7a5892bab0c473771c855c3afd6be2dc2639036d Naomi Seyfer committed Jan 17, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 packages/logging/logging.js
@@ -145,8 +145,8 @@ _.each(['debug', 'info', 'warn', 'error'], function (level) {
if (_.has(obj, 'message') && !_.isString(obj.message))
throw new Error("The 'message' field in log objects must be a string");
-
- obj = _.extend(Log._getCallerDetails(), obj);
+ if (!obj.omitCallerDetails)
+ obj = _.extend(Log._getCallerDetails(), obj);
obj.time = new Date();
obj.level = level;

0 comments on commit 7a5892b

Please sign in to comment.