Beispiel #1
0
void Utils::CLogger::FatalBy( LPCTSTR lpInstance,LPCTSTR pstrFormat, ... )
{
	log4cplus::Logger logger = log4cplus::Logger::getInstance(lpInstance);
	if ( logger.isEnabledFor(FATAL_LOG_LEVEL))
	{
		int nSize = 0;
		CString strTemp;
		va_list args;
		va_start(args, pstrFormat);
		nSize = _vsntprintf_s( strTemp.GetBufferSetLength(MAX_LOG_SIZE),MAX_LOG_SIZE -1, MAX_LOG_SIZE-2, pstrFormat, args);
		strTemp.ReleaseBufferSetLength(nSize);
		va_end(args);
		logger.forcedLog(FATAL_LOG_LEVEL, strTemp.GetString());
	}
	CleanThread();
}
Beispiel #2
0
void Utils::CLogger::Log( LogLevel level, LPCTSTR pstrFormat, ... )
{
	log4cplus::Logger rootLogger = log4cplus::Logger::getRoot();
	if ( rootLogger.isEnabledFor(level))
	{
		int nSize = 0;
		CString strTemp;
		va_list args;
		va_start(args, pstrFormat);
		nSize = _vsntprintf_s( strTemp.GetBufferSetLength(MAX_LOG_SIZE),MAX_LOG_SIZE -1, MAX_LOG_SIZE-2, pstrFormat, args);
		strTemp.ReleaseBufferSetLength(nSize);
		va_end(args);
		rootLogger.forcedLog(level, strTemp.GetString());
	}
	CleanThread();
}
Beispiel #3
0
int RemoveTmp(WPARAM,LPARAM)
{
	void CleanThread();
	CleanThread();
	return 0;
}