Skip to content

Commit

Permalink
Merge pull request #6617 from ggazzo/fix-logger
Browse files Browse the repository at this point in the history
[FIX] arguments logger
  • Loading branch information
engelgabriel authored Apr 6, 2017
2 parents b9fe09b + 10aabd1 commit a619fb4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/rocketchat-logger/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const defaultTypes = {

class _Logger {
constructor(name, config = {}) {
self = this;
const self = this;
this.name = name;

this.config = Object.assign({}, config);
Expand Down Expand Up @@ -141,12 +141,12 @@ class _Logger {
_.each(this.config.sections, (name, section) => {
this[section] = {};
_.each(defaultTypes, (typeConfig, type) => {
self[section][type] = () => self[type].apply({__section: name}, arguments);
self[section][`${ type }_box`] = () => self[`${ type }_box`].apply({__section: name}, arguments);
self[section][type] = (...args) => this[type].apply({__section: name}, args);
self[section][`${ type }_box`] = (...args) => this[`${ type }_box`].apply({__section: name}, args);
});
_.each(this.config.methods, (typeConfig, method) => {
self[section][method] = () => self[method].apply({__section: name}, arguments);
self[section][`${ method }_box`] = () => self[`${ method }_box`].apply({__section: name}, arguments);
self[section][method] = (...args) => self[method].apply({__section: name}, args);
self[section][`${ method }_box`] = (...args) => self[`${ method }_box`].apply({__section: name}, args);
});
});
}
Expand Down

0 comments on commit a619fb4

Please sign in to comment.