diff options
| author | Nolan Check <Nolan.Check@gmail.com> | 2009-07-12 21:58:32 +0000 |
|---|---|---|
| committer | Nolan Check <Nolan.Check@gmail.com> | 2009-07-12 21:58:32 +0000 |
| commit | d85f5a69375f807c5b523e52e2aac48a2445fb28 (patch) | |
| tree | 1ec55aa073d28b1eff31487b6cffa2c53a46e89e /Source/Core/Common/Src/LogManager.cpp | |
| parent | 839ed9103df4ba46079461fafdae3f68bffb4f80 (diff) | |
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
Diffstat (limited to 'Source/Core/Common/Src/LogManager.cpp')
| -rw-r--r-- | Source/Core/Common/Src/LogManager.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/Core/Common/Src/LogManager.cpp b/Source/Core/Common/Src/LogManager.cpp index 0159ddc174..b9dad4be6d 100644 --- a/Source/Core/Common/Src/LogManager.cpp +++ b/Source/Core/Common/Src/LogManager.cpp @@ -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", |
