diff --git a/Library/Litestep.cpp b/Library/Litestep.cpp index 4608b958..4663c669 100644 --- a/Library/Litestep.cpp +++ b/Library/Litestep.cpp @@ -546,7 +546,12 @@ BOOL LSLog(int nLevel, LPCTSTR pszModule, LPCTSTR pszMessage) logInfo.type = L"DEBUG"; break; } + Rainmeter->m_LogData.push_front(logInfo); + if (Rainmeter->m_LogData.size() > MAXABOUTLOGLINES) + { + Rainmeter->m_LogData.pop_back(); + } // Use the lsapi.dll version of the method if possible if (fpLSLog) @@ -590,6 +595,7 @@ BOOL LSLog(int nLevel, LPCTSTR pszModule, LPCTSTR pszMessage) if (logFile) { fputws(logInfo.type.c_str(), logFile); + fputws(L": ", logFile); fputws(message.c_str(), logFile); fputws(L"\n", logFile); fclose(logFile); @@ -597,10 +603,6 @@ BOOL LSLog(int nLevel, LPCTSTR pszModule, LPCTSTR pszMessage) } } } - if (Rainmeter->m_LogData.size() > MAXABOUTLOGLINES) - { - Rainmeter->m_LogData.pop_back(); - } return TRUE; }