Skip to content

Commit 11b7613

Browse files
committed
fixed:log configure is not work
1 parent 8a059fc commit 11b7613

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_StreamMediaApp.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,14 @@ int main(int argc, char** argv)
159159
#if 1 == _XENGINE_STREAMMEDIA_BUILDSWITCH_SRT
160160
THREADPOOL_PARAMENT** ppSt_ListSRTParam;
161161
#endif
162-
163162
memset(&st_XLogConfig, '\0', sizeof(HELPCOMPONENTS_XLOG_CONFIGURE));
164163
memset(&st_ServiceConfig, '\0', sizeof(XENGINE_SERVICECONFIG));
165164

166165
//pSt_VFile = _xtfopen("./1.ts", "wb");
167166
//pSt_AFile = _xtfopen("./1.h264", "wb");
168167

169-
st_XLogConfig.XLog_MaxBackupFile = 10;
170-
st_XLogConfig.XLog_MaxSize = 1024000;
168+
st_XLogConfig.XLog_MaxBackupFile = st_ServiceConfig.st_XLog.nMaxCount;
169+
st_XLogConfig.XLog_MaxSize = st_ServiceConfig.st_XLog.nMaxSize;
171170
_tcsxcpy(st_XLogConfig.tszFileName, lpszLogFile);
172171
//初始化参数
173172
if (!XEngine_Configure_Parament(argc, argv))
@@ -180,7 +179,7 @@ int main(int argc, char** argv)
180179
ServiceApp_Deamon();
181180
}
182181
//初始日志
183-
xhLog = HelpComponents_XLog_Init(HELPCOMPONENTS_XLOG_OUTTYPE_STD | HELPCOMPONENTS_XLOG_OUTTYPE_FILE, &st_XLogConfig);
182+
xhLog = HelpComponents_XLog_Init(st_ServiceConfig.st_XLog.nLogLeave, &st_XLogConfig);
184183
if (NULL == xhLog)
185184
{
186185
printf("启动服务中,启动日志失败,错误:%lX", XLog_GetLastError());

0 commit comments

Comments
 (0)