From 1147a555a77dbe9bd1f653242fdbfdf476bf56ab Mon Sep 17 00:00:00 2001
From: mbellgardt <bellgardt@vr.rwth-aachen.de>
Date: Thu, 30 Jan 2020 11:27:09 +0100
Subject: [PATCH] Add the fix

---
 Source/UniversalLogging/Public/IUniversalLogging.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Source/UniversalLogging/Public/IUniversalLogging.h b/Source/UniversalLogging/Public/IUniversalLogging.h
index f65c4da..05af368 100644
--- a/Source/UniversalLogging/Public/IUniversalLogging.h
+++ b/Source/UniversalLogging/Public/IUniversalLogging.h
@@ -71,10 +71,12 @@ public:
   * Advanced logging with printf like syntax.
   * Note: Does not automatically add newline!
   */
-  template<typename... TArgs>
-  void LogF(const FString Stream, const FString Format, TArgs&&... Args)
+  template<typename FmtType, typename... TArgs>
+  void LogF(const FString Stream, const FmtType& Format, TArgs&&... Args)
   {
-    const FString Out = FString::Printf(*Format, Args...);
+    static_assert(TIsArrayOrRefOfType<FmtType, TCHAR>::Value, "Format must be a TCHAR string literal, i.e., only ever call this function with TEXT(\"...\") as the second parameter.");
+
+    const FString Out = FString::Printf(Format, Args...);
     Log(Out, Stream, true);
   }
 };
-- 
GitLab