浏览代码

feat(BridgeChannel): don't log channel objects

They are really verbose, and add no real value. In addition, log the channel
type once opened.
dev1
Saúl Ibarra Corretgé 8 年前
父节点
当前提交
dcb6c14dfe
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4
    4
      modules/RTC/BridgeChannel.js

+ 4
- 4
modules/RTC/BridgeChannel.js 查看文件

176
         const emitter = this._eventEmitter;
176
         const emitter = this._eventEmitter;
177
 
177
 
178
         channel.onopen = () => {
178
         channel.onopen = () => {
179
-            logger.info('Channel opened by the Videobridge!', channel);
179
+            logger.info(`${this._mode} channel opened`);
180
 
180
 
181
             // Code sample for sending string and/or binary data.
181
             // Code sample for sending string and/or binary data.
182
             // Sends string message to the bridge:
182
             // Sends string message to the bridge:
188
         };
188
         };
189
 
189
 
190
         channel.onerror = error => {
190
         channel.onerror = error => {
191
-            logger.error('Channel error:', error, channel);
191
+            logger.error('Channel error:', error);
192
         };
192
         };
193
 
193
 
194
         channel.onmessage = ({ data }) => {
194
         channel.onmessage = ({ data }) => {
201
                 GlobalOnErrorHandler.callErrorHandler(error);
201
                 GlobalOnErrorHandler.callErrorHandler(error);
202
                 logger.error(
202
                 logger.error(
203
                     'Failed to parse channel message as JSON: ',
203
                     'Failed to parse channel message as JSON: ',
204
-                    data, channel, error);
204
+                    data, error);
205
 
205
 
206
                 return;
206
                 return;
207
             }
207
             }
264
         };
264
         };
265
 
265
 
266
         channel.onclose = () => {
266
         channel.onclose = () => {
267
-            logger.info('Channel closed', channel);
267
+            logger.info('Channel closed');
268
 
268
 
269
             // Remove the channel.
269
             // Remove the channel.
270
             this._channel = null;
270
             this._channel = null;

正在加载...
取消
保存