@@ -39,9 +39,6 @@ static XATOMIC g_nHaveXLogVerShort = XFALSE;
3939static XATOMIC g_nHaveXLogVerLong = XFALSE ;
4040static XATOMIC g_bInit = XFALSE ;
4141
42- static char g_xlogVerShort [128 ];
43- static char g_xlogVerLong [256 ];
44-
4542static const char * XLog_GetIndent (xlog_flag_t eFlag )
4643{
4744 xlog_cfg_t * pCfg = & g_xlog .config ;
@@ -287,7 +284,7 @@ static void XLog_DisplayStack(const xlog_ctx_t *pCtx, va_list args)
287284 XLog_DisplayMessage (pCtx , sLogInfo , nLength , sMessage );
288285}
289286
290- void XLog_Display (xlog_flag_t eFlag , xbool_t bNewLine , const char * pFormat , ...)
287+ void XLog_Display (xlog_flag_t eFlag , xbool_t bNewLine , const char * pFmt , ...)
291288{
292289 XASSERT_VOID_RET (g_bInit );
293290 XSync_Lock (& g_xlog .lock );
@@ -301,14 +298,14 @@ void XLog_Display(xlog_flag_t eFlag, xbool_t bNewLine, const char *pFormat, ...)
301298 xlog_ctx_t ctx ;
302299 ctx .nUsec = XTime_Get (& ctx .time );
303300 ctx .eFlag = eFlag ;
304- ctx .pFormat = pFormat ;
301+ ctx .pFormat = pFmt ;
305302 ctx .bNewLine = bNewLine ;
306303
307304 void (* XLog_DisplayArgs )(const xlog_ctx_t * pCtx , va_list args );
308305 XLog_DisplayArgs = pCfg -> bUseHeap ? XLog_DisplayHeap : XLog_DisplayStack ;
309306
310307 va_list args ;
311- va_start (args , pFormat );
308+ va_start (args , pFmt );
312309 XLog_DisplayArgs (& ctx , args );
313310 va_end (args );
314311 }
@@ -392,32 +389,6 @@ void* XLog_ThrowPtr(void* pRetVal, const char *pFmt, ...)
392389 return pRetVal ;
393390}
394391
395- const char * XLog_Version (xbool_t bShort )
396- {
397- if (bShort )
398- {
399- if (!g_nHaveXLogVerShort )
400- {
401- xstrncpyf (g_xlogVerShort , sizeof (g_xlogVerShort ), "%d.%d.%d" ,
402- XLOG_VERSION_MAJOR , XLOG_VERSION_MINOR , SLOG_BUILD_NUMBER );
403-
404- g_nHaveXLogVerShort = XTRUE ;
405- }
406-
407- return g_xlogVerShort ;
408- }
409-
410- if (!g_nHaveXLogVerLong )
411- {
412- xstrncpyf (g_xlogVerLong , sizeof (g_xlogVerLong ), "%d.%d build %d (%s)" ,
413- XLOG_VERSION_MAJOR , XLOG_VERSION_MINOR , SLOG_BUILD_NUMBER , __DATE__ );
414-
415- g_nHaveXLogVerLong = XTRUE ;
416- }
417-
418- return g_xlogVerLong ;
419- }
420-
421392void XLog_ConfigGet (struct XLogConfig * pCfg )
422393{
423394 XASSERT_VOID_RET (g_bInit );
0 commit comments