log优化
This commit is contained in:
@@ -9,6 +9,9 @@ import {
|
||||
loadUserSettings
|
||||
} from './connectview.js';
|
||||
import { createInviteController } from './invite-controller.js';
|
||||
import { createLogger } from './logger.js';
|
||||
|
||||
const logger = createLogger('main');
|
||||
|
||||
let connectionId = '';
|
||||
let currentView = 'connect';
|
||||
@@ -43,10 +46,10 @@ async function switchToCallView(targetConnectionId) {
|
||||
renderer.renderHeaderTitle();
|
||||
callViewController.bindDomEvents();
|
||||
|
||||
console.log('Video call app initialized successfully');
|
||||
logger.debug('Video call app initialized successfully');
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.error('Error initializing app:', error);
|
||||
logger.error('Error initializing app:', error);
|
||||
showNotification('初始化失败,请刷新页面重试', 'error');
|
||||
return false;
|
||||
}
|
||||
@@ -116,9 +119,9 @@ window.addEventListener('DOMContentLoaded', async () => {
|
||||
inviteController.showCallRequestDialog(invitePayload);
|
||||
}
|
||||
|
||||
console.log('SPA initialized, showing connect view');
|
||||
logger.debug('SPA initialized, showing connect view');
|
||||
} catch (error) {
|
||||
console.error('Error initializing SPA:', error);
|
||||
logger.error('Error initializing SPA:', error);
|
||||
showNotification('初始化失败,请刷新页面重试', 'error');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user