日志显示

This commit is contained in:
yj 2024-12-09 11:01:13 +08:00
parent 9619230cf8
commit 4528696ec7
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,7 @@ import { GetRoomRtcToken, GetAgoraConf } from "@/api/Home/Index";
import { storage } from '@/utils'; import { storage } from '@/utils';
import { role } from "@/config/role"; import { role } from "@/config/role";
import path from "path"; import path from "path";
import os from "os";
const option: any = { const option: any = {
appId: '', appId: '',
token: '', token: '',
@ -44,6 +45,7 @@ export const agora = {
rtcEngine = createAgoraRtcEngine(); rtcEngine = createAgoraRtcEngine();
await rtcEngine.initialize({ await rtcEngine.initialize({
appId: data, appId: data,
logConfig: { filePath: path.resolve(os.homedir(), "./errorAgora.log") }
}); });
if (bool) { if (bool) {
await agora.setDeviceManager() await agora.setDeviceManager()