From 10aabd120c66e018ebd12b12f44ba960a9de399d Mon Sep 17 00:00:00 2001
From: Guilherme Gazzo <guilhermegazzo@gmail.com>
Date: Thu, 6 Apr 2017 15:14:23 -0300
Subject: [PATCH] fix arguments logger

---
 packages/rocketchat-logger/server.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/packages/rocketchat-logger/server.js b/packages/rocketchat-logger/server.js
index 564751f6f7e..7f1f97859c9 100644
--- a/packages/rocketchat-logger/server.js
+++ b/packages/rocketchat-logger/server.js
@@ -78,7 +78,7 @@ const defaultTypes = {
 
 class _Logger {
 	constructor(name, config = {}) {
-		self = this;
+		const self = this;
 		this.name = name;
 
 		this.config = Object.assign({}, config);
@@ -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);
 				});
 			});
 		}
-- 
GitLab