Skip to content

Instantly share code, notes, and snippets.

@dorgonman
Created September 27, 2015 02:49
Show Gist options
  • Save dorgonman/272214df7bf008cc96f9 to your computer and use it in GitHub Desktop.
Save dorgonman/272214df7bf008cc96f9 to your computer and use it in GitHub Desktop.
Horizon-WindowsLogImplement
#include "precompile/precompiled.h"
#include "HorizonLog.h"
#include <Windows.h>
#include <tchar.h>
namespace horizon{
void logMessageImplementInternal(const std::string& msg){
WCHAR wszBuf[HORIZON_LOG_MAX_LEN] = { 0 };
MultiByteToWideChar(CP_UTF8, 0, msg.c_str(), -1, wszBuf, sizeof(wszBuf));
OutputDebugStringW(wszBuf);
}
void LogBasicBackend::logMessageImplement(const std::string& msg){
logMessageImplementInternal(msg);
}
void LogBasicFormatedBackend::logMessageImplement(const std::string& msg){
logMessageImplementInternal(msg);
}
}//namespace horizon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment