瀏覽代碼

Replace console with logger print in recording module

master
yanas 9 年之前
父節點
當前提交
8c80acff2f
共有 1 個檔案被更改,包括 6 行新增6 行删除
  1. 6
    6
      modules/xmpp/recording.js

+ 6
- 6
modules/xmpp/recording.js 查看文件

51
         return;
51
         return;
52
 
52
 
53
     var newState = attributes.status;
53
     var newState = attributes.status;
54
-    console.log("Handle jibri presence : ", newState);
54
+    logger.log("Handle jibri presence : ", newState);
55
 
55
 
56
     if (newState === this.state)
56
     if (newState === this.state)
57
         return;
57
         return;
126
             // TODO wait for an IQ with the real status, since this is
126
             // TODO wait for an IQ with the real status, since this is
127
             // provisional?
127
             // provisional?
128
             self.jireconRid = $(result).find('recording').attr('rid');
128
             self.jireconRid = $(result).find('recording').attr('rid');
129
-            console.log('Recording ' +
129
+            logger.log('Recording ' +
130
                 ((state === Recording.status.ON) ? 'started' : 'stopped') +
130
                 ((state === Recording.status.ON) ? 'started' : 'stopped') +
131
                 '(jirecon)' + result);
131
                 '(jirecon)' + result);
132
             self.state = state;
132
             self.state = state;
137
             callback(state);
137
             callback(state);
138
         },
138
         },
139
         function (error) {
139
         function (error) {
140
-            console.log('Failed to start recording, error: ', error);
140
+            logger.log('Failed to start recording, error: ', error);
141
             errCallback(error);
141
             errCallback(error);
142
         });
142
         });
143
 };
143
 };
156
     var self = this;
156
     var self = this;
157
     this.connection.sendIQ(elem,
157
     this.connection.sendIQ(elem,
158
         function (result) {
158
         function (result) {
159
-            console.log('Set recording "', state, '". Result:', result);
159
+            logger.log('Set recording "', state, '". Result:', result);
160
             var recordingElem = $(result).find('>conference>recording');
160
             var recordingElem = $(result).find('>conference>recording');
161
             var newState = recordingElem.attr('state');
161
             var newState = recordingElem.attr('state');
162
 
162
 
174
             }
174
             }
175
         },
175
         },
176
         function (error) {
176
         function (error) {
177
-            console.warn(error);
177
+            logger.warn(error);
178
             errCallback(error);
178
             errCallback(error);
179
         }
179
         }
180
     );
180
     );
193
             this.setRecordingJibri(state, callback, errCallback, options);
193
             this.setRecordingJibri(state, callback, errCallback, options);
194
             break;
194
             break;
195
         default:
195
         default:
196
-            console.error("Unknown recording type!");
196
+            logger.error("Unknown recording type!");
197
             return;
197
             return;
198
     }
198
     }
199
 };
199
 };

Loading…
取消
儲存