Skip to content

Instantly share code, notes, and snippets.

@dorgonman
Last active March 26, 2016 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dorgonman/0db4138c2cee95b51582 to your computer and use it in GitHub Desktop.
Save dorgonman/0db4138c2cee95b51582 to your computer and use it in GitHub Desktop.
UE4_plus_horizon_log.init
void logMessageImplement(const std::string& msg) {
FString str = UTF8_TO_TCHAR(msg.c_str());
UE_LOG(LogTemp, Log, TEXT("%s"), *str);
// FPlatformMisc::LowLevelOutputDebugString(TEXT("HorizonLogBasicBackend test"));
//FPlatformMisc::LowLevelOutputDebugString(UTF8_TO_TCHAR(msg.c_str()));
}
FString savedPath = FPaths::ConvertRelativePathToFull(FPaths::GameLogDir());
std::string logFilePath = std::string(TCHAR_TO_UTF8(*savedPath)) + "HorizonLog.txt";
horizon::HorizonCore::GetInstance()->initDefaultLog(logFilePath, std::bind(logMessageImplement, std::placeholders::_1));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment