diff --git a/Source/UniversalLogging/Private/LogFileStream.cpp b/Source/UniversalLogging/Private/LogFileStream.cpp index 07eb40995f9240f01d532f318eeefe4cb3597fc5..03b77bea0c4292158cdd13741af48e6c97e09d55 100644 --- a/Source/UniversalLogging/Private/LogFileStream.cpp +++ b/Source/UniversalLogging/Private/LogFileStream.cpp @@ -1,7 +1,7 @@ #include "LogFileStream.h" #include "HAL/PlatformFilemanager.h" - +#include "LogStream.h" #include "Misc/Paths.h" LogFileStream::LogFileStream(const FString Filepath, const FString Filename) @@ -26,7 +26,7 @@ void LogFileStream::Open() File_Handle = platform_file.OpenWrite(*file_path); if (!File_Handle) { - UE_LOG(LogTemp, Error, TEXT("Universal Logging: The file %s could not be opened for writing."), *file_path); + UE_LOG(LogUni, Error, TEXT("Universal Logging: The file %s could not be opened for writing."), *file_path); bIs_Open = false; return; } diff --git a/Source/UniversalLogging/Private/LogStream.cpp b/Source/UniversalLogging/Private/LogStream.cpp index c20b9d8f4aa7f00b108ab1b4dde60dd6a5ba6cec..a777b7b724c6320d790700e68c6ebbfa0c00fa55 100644 --- a/Source/UniversalLogging/Private/LogStream.cpp +++ b/Source/UniversalLogging/Private/LogStream.cpp @@ -3,6 +3,9 @@ #include "Misc/Paths.h" +DEFINE_LOG_CATEGORY(LogUni); + + LogStreamImpl::LogStreamImpl(const FString Filepath, const FString Filename, const bool bPer_Session, const bool bLogOnMaster, const bool bLogOnSlaves) : Filepath(Filepath) , Filename(Filename) diff --git a/Source/UniversalLogging/Private/LogStream.h b/Source/UniversalLogging/Private/LogStream.h index ab28299bdd218dc4407a4f50b3c2dbf6fc46cf0a..54969aba8b14651970c4a985a19cd22a9f582462 100644 --- a/Source/UniversalLogging/Private/LogStream.h +++ b/Source/UniversalLogging/Private/LogStream.h @@ -6,6 +6,8 @@ #include "Math/Color.h" +DECLARE_LOG_CATEGORY_EXTERN(LogUni, Log, All); + class LogStreamImpl : public ILogStream { public: diff --git a/Source/UniversalLogging/Private/UniversalLogging.cpp b/Source/UniversalLogging/Private/UniversalLogging.cpp index 390fc0768aba17aaad43da3ac38441c219f86ea3..142e73b90bea2df1fa949e51eb11df375dd281f8 100644 --- a/Source/UniversalLogging/Private/UniversalLogging.cpp +++ b/Source/UniversalLogging/Private/UniversalLogging.cpp @@ -130,7 +130,7 @@ void UniversalLoggingImpl::Log(const FString Text, const FString Stream /*= ""*/ if(Stream_OBJ->GetLogToDefaultLog()) { - UE_LOG(LogTemp, Log, TEXT("[Universal Logging][%s] %s"), *Stream, *Full_Text); + UE_LOG(LogUni, Log, TEXT("[%s] %s"), *Stream, *Full_Text); } }