1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Logging cleanup

This commit is contained in:
AlexVinS
2017-08-10 19:39:27 +03:00
parent 18b8e1c7ad
commit 61e241308d
52 changed files with 188 additions and 188 deletions

View File

@@ -56,7 +56,7 @@ void printWinError()
int error = GetLastError();
if(!error)
{
logGlobal->errorStream() << "No Win error information set.";
logGlobal->error("No Win error information set.");
return;
}
logGlobal->errorStream() << "Error " << error << " encountered:";
@@ -106,7 +106,7 @@ const char* exceptionName(DWORD exc)
LONG WINAPI onUnhandledException(EXCEPTION_POINTERS* exception)
{
logGlobal->errorStream() << "Disaster happened.";
logGlobal->error("Disaster happened.");
PEXCEPTION_RECORD einfo = exception->ExceptionRecord;
logGlobal->errorStream() << "Reason: 0x" << std::hex << einfo->ExceptionCode << " - " << exceptionName(einfo->ExceptionCode)
@@ -242,10 +242,10 @@ CConsoleHandler::CConsoleHandler() : thread(nullptr)
}
CConsoleHandler::~CConsoleHandler()
{
logGlobal->infoStream() << "Killing console...";
logGlobal->info("Killing console...");
end();
delete cb;
logGlobal->infoStream() << "Killing console... done!";
logGlobal->info("Killing console... done!");
}
void CConsoleHandler::end()
{