revert wlog debug formating

This commit is contained in:
ivan-83 2015-05-02 02:31:09 +03:00
parent 83a40a32a7
commit 92662a1854
1 changed files with 2 additions and 6 deletions

View File

@ -216,7 +216,7 @@ int WLog_PrintMessageVA(wLog* log, wLogMessage* message, va_list args)
if (message->Type == WLOG_MESSAGE_TEXT)
{
if (!strchr(message->FormatString, '%') && message->Level != WLOG_DEBUG && message->Level != WLOG_ERROR)
if (!strchr(message->FormatString, '%'))
{
message->TextString = (LPSTR) message->FormatString;
status = WLog_Write(log, message);
@ -224,11 +224,7 @@ int WLog_PrintMessageVA(wLog* log, wLogMessage* message, va_list args)
else
{
char formattedLogMessage[WLOG_MAX_STRING_SIZE];
int offset = 0;
if (message->Level == WLOG_DEBUG || message->Level == WLOG_ERROR)
offset = sprintf_s(formattedLogMessage, (WLOG_MAX_STRING_SIZE - 1), "%s, line %i: ", message->FunctionName, message->LineNumber);
wvsnprintfx((formattedLogMessage + offset), ((WLOG_MAX_STRING_SIZE - 1) - offset), message->FormatString, args);
wvsnprintfx(formattedLogMessage, WLOG_MAX_STRING_SIZE - 1, message->FormatString, args);
message->TextString = formattedLogMessage;
status = WLog_Write(log, message);
}