mirror of
https://github.com/Ed94/Cog.git
synced 2026-07-27 01:40:03 +00:00
Move CogLogCategory in common project
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user