Rearrange LogManager includes. The main purpose is to make it possible to modify Thread.h without recompiling the whole entire project.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3770 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Nolan Check
2009-07-12 21:58:32 +00:00
parent 839ed9103d
commit d85f5a6937
27 changed files with 68 additions and 34 deletions

View File

@ -18,6 +18,14 @@
#include "LogManager.h"
#include "Timer.h"
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char* fmt, ...)
{
va_list args;
va_start(args, fmt);
LogManager::GetInstance()->Log(level, type, fmt, args);
va_end(args);
}
LogManager *LogManager::m_logManager = NULL;
LogManager::LogManager()\
@ -85,8 +93,7 @@ LogManager::~LogManager() {
}
void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
const char *format, ...) {
va_list args;
const char *format, va_list args) {
char temp[MAX_MSGLEN];
char msg[MAX_MSGLEN + 512];
@ -94,10 +101,8 @@ void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
if (! log->isEnable() || level > log->getLevel())
return;
va_start(args, format);
CharArrayFromFormatV(temp, MAX_MSGLEN, format, args);
va_end(args);
static const char level_to_char[7] = "-NEWID";
sprintf(msg, "%s %c[%s]: %s\n",