|
|
@@ -21,6 +21,7 @@ window.toastr = require("toastr");
|
|
21
|
21
|
|
|
22
|
22
|
const Logger = require("jitsi-meet-logger");
|
|
23
|
23
|
const LogCollector = Logger.LogCollector;
|
|
|
24
|
+import JitsiMeetLogStorage from "./modules/util/JitsiMeetLogStorage";
|
|
24
|
25
|
|
|
25
|
26
|
import URLProcessor from "./modules/config/URLProcessor";
|
|
26
|
27
|
import RoomnameGenerator from './modules/util/RoomnameGenerator';
|
|
|
@@ -163,26 +164,7 @@ const APP = {
|
|
163
|
164
|
configureLoggingLevels();
|
|
164
|
165
|
// Start the LogCollector and register it as the global log transport
|
|
165
|
166
|
if (!this.logCollector && !loggingConfig.disableLogCollector) {
|
|
166
|
|
- this.logCollector = new LogCollector({
|
|
167
|
|
- storeLogs: (logJSON) => {
|
|
168
|
|
- // Try catch was used, because there are many variables
|
|
169
|
|
- // on the way that could be uninitialized if the storeLogs
|
|
170
|
|
- // attempt would be made very early (which is unlikely)
|
|
171
|
|
- try {
|
|
172
|
|
- // Currently it makes sense to store the log only
|
|
173
|
|
- // if CallStats is enabled
|
|
174
|
|
- if (APP.logCollectorStarted
|
|
175
|
|
- && APP.conference
|
|
176
|
|
- && APP.conference.isCallstatsEnabled()) {
|
|
177
|
|
- APP.conference.logJSON(logJSON);
|
|
178
|
|
- }
|
|
179
|
|
- } catch (error) {
|
|
180
|
|
- // NOTE console is intentional here
|
|
181
|
|
- console.error(
|
|
182
|
|
- "Failed to store the logs: ", logJSON, error);
|
|
183
|
|
- }
|
|
184
|
|
- }
|
|
185
|
|
- });
|
|
|
167
|
+ this.logCollector = new LogCollector(new JitsiMeetLogStorage());
|
|
186
|
168
|
Logger.addGlobalTransport(this.logCollector);
|
|
187
|
169
|
JitsiMeetJS.addGlobalLogTransport(this.logCollector);
|
|
188
|
170
|
}
|