#정의
ArenaBattle.h
-----------------------------------------------------------
#pragma once
#include "EngineMinimal.h"
DECLARE_LOG_CATEGORY_EXTERN(ArenaBattle, Log, All);
-----------------------------------------------------------
ArenaBattle.cpp
-----------------------------------------------------------
#include "ArenaBattle.h"
#include "Modules/ModuleManager.h"
DEFINE_LOG_CATEGORY(ArenaBattle);
-----------------------------------------------------------
#사용 예
Fountain.cpp
-----------------------------------------------------------
UE_LOG(ArenaBattle, Warning, TEXT("Test"));
-----------------------------------------------------------
#정의
ArenaBattle.h
-----------------------------------------------------------
#pragma once
#include "EngineMinimal.h"
DECLARE_LOG_CATEGORY_EXTERN(ArenaBattle, Log, All);
#define ABLOG_CALLINFO (FString(__FUNCTION__) + TEXT("(") \
+ FString::FromInt(__LINE__) + TEXT(")"))
#define ABLOG_S(Verbosity) UE_LOG(ArenaBattle, Verbosity, TEXT("%s"), *ABLOG_CALLINFO)
#define ABLOG(Verbosity, Format, ...) UE_LOG(ArenaBattle, Verbosity, \
TEXT("%s%s"), *ABLOG_CALLINFO, *FString::Printf(Format, ##__VA_ARGS__))
-----------------------------------------------------------
#사용 예
Fountain.cpp
-----------------------------------------------------------
ABLOG_S(Warning);
ABLOG(Warning, TEXT("Test"));
-----------------------------------------------------------