diff --git a/source/cLog.cpp b/source/cLog.cpp index f8d1c731b..cf8448d8b 100644 --- a/source/cLog.cpp +++ b/source/cLog.cpp @@ -98,15 +98,7 @@ void cLog::ClearLog() void cLog::Log(const char * a_Format, va_list argList) { AString Message; - if (argList != NULL) - { - AppendVPrintf(Message, a_Format, argList); - } - else - { - // This branch needs to be here because of *nix crashing in vsnprintf() when argList is NULL - Message.assign(a_Format); - } + AppendVPrintf(Message, a_Format, argList); time_t rawtime; time ( &rawtime ); diff --git a/source/cMCLogger.cpp b/source/cMCLogger.cpp index e966e7788..0869daa53 100644 --- a/source/cMCLogger.cpp +++ b/source/cMCLogger.cpp @@ -59,19 +59,19 @@ void cMCLogger::LogSimple(const char* a_Text, int a_LogType /* = 0 */ ) switch( a_LogType ) { case 0: - Log(a_Text, 0); + LOG("%s", a_Text); break; case 1: - Info(a_Text, 0); + LOGINFO("%s", a_Text); break; case 2: - Warn(a_Text, 0); + LOGWARN("%s", a_Text); break; case 3: - Error(a_Text, 0); + LOGERROR("%s", a_Text); break; default: - Log(a_Text, 0); + LOG("(#%d#: %s", a_LogType, a_Text); break; } }