Move CogLogCategory in common project

This commit is contained in:
Arnaud Jamin
2024-03-01 11:04:14 -05:00
parent 14ca7e035e
commit dd2c4ad694
14 changed files with 67 additions and 66 deletions
@@ -1,5 +1,6 @@
#include "CogDebugLog.h"
#include "CogCommonLogCategory.h"
#include "CogDebugModule.h"
#include "CogDebugReplicator.h"
#include "Engine/Engine.h"
@@ -149,3 +150,32 @@ void FCogDebugLog::DeactivateAllLogCategories(UWorld& World)
PlayerController->ServerExec(ToggleStr);
}
}
//--------------------------------------------------------------------------------------------------------------------------
FLogCategoryBase* FCogDebugLog::GetLogCategoryBase(const FCogLogCategory& LogCategory)
{
#if NO_LOGGING
return nullptr;
#else
if (LogCategory.Name.IsNone() || LogCategory.Name.IsValid() == false)
{
return nullptr;
}
if (LogCategory.LogCategory == nullptr)
{
if (const FCogDebugLogCategoryInfo* CategoryInfo = FCogDebugLog::GetLogCategories().Find(LogCategory.Name))
{
LogCategory.LogCategory = CategoryInfo->LogCategory;
}
}
return LogCategory.LogCategory;
#endif //NO_LOGGING
}