Added prototypes and functions to initialize the logger client and associated mutex.

git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@594 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
dsandersoremutah
2006-06-20 18:32:08 +00:00
parent fb5945653d
commit 720fd25e8c
4 changed files with 67 additions and 0 deletions

View File

@@ -1430,3 +1430,51 @@ void F_Trace::outputCurrentText(
m_pszDestStr = &m_szDestStr [0];
}
}
/****************************************************************************
Desc: Initialize the toolkit logger
****************************************************************************/
RCODE f_loggerInit( void)
{
RCODE rc = NE_FLM_OK;
if (RC_BAD( rc = f_mutexCreate( &gv_hLoggerMutex)))
{
goto Exit;
}
Exit:
return( rc);
}
/****************************************************************************
Desc: Shutdown the toolkit logger
****************************************************************************/
void f_loggerShutdown( void)
{
if (gv_pLogger)
{
gv_pLogger->Release();
gv_pLogger = NULL;
}
if (gv_hLoggerMutex != F_MUTEX_NULL)
{
f_mutexDestroy( &gv_hLoggerMutex);
}
}
void f_setLoggerClient(
IF_LoggerClient * pLogger)
{
f_mutexLock( gv_hLoggerMutex);
if (gv_pLogger)
{
gv_pLogger->Release();
}
if ((gv_pLogger = pLogger) != NULL)
{
gv_pLogger->AddRef();
}
f_mutexUnlock( gv_hLoggerMutex);
}