Skip to content

Commit

Permalink
fix: logging
Browse files Browse the repository at this point in the history
  • Loading branch information
zetxx committed Jan 21, 2020
1 parent 726db80 commit 5e9eb86
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,7 @@ class Brid {
this.apiMethods[channel][method] = async(ctx, ...args) => {
let [message, meta] = args;
this.log('trace', {in: 'base.registerMethod', description: `exec method: ${channel}.${method}`, message, meta: getSerializableMeta(meta)});
try {
return fn.call(ctx, ...args);
} catch (e) {
this.log('error', {in: 'base.registerMethod', description: `exec method: ${channel}.${method}`, meta: getSerializableMeta(meta), error: e});
throw e;
}
return fn.call(ctx, ...args);
};
}

Expand Down

0 comments on commit 5e9eb86

Please sign in to comment.