5#include "CoreMinimal.h"
18#define LOG_CALL_INFO (FString(__FUNCTION__) + TEXT(": ") + FString::FromInt(__LINE__))
21#define LOG_CLASS (FString(__FUNCTION__).Left(FString(__FUNCTION__).Find(TEXT("::"))))
26#define NAMEOF(Type) ([]{ (void)sizeof(Type); return TEXT(#Type); }())
30#define LOG_INFO(Category, Format, ...) UE_LOG(Category, Log, TEXT("%s: %s"), *LOG_CALL_INFO, *FString::Printf(TEXT(Format), ##__VA_ARGS__))
31#define LOG_WARNING(Category, Format, ...) UE_LOG(Category, Warning, TEXT("%s: %s"), *LOG_CALL_INFO, *FString::Printf(TEXT(Format), ##__VA_ARGS__))
32#define LOG_ERROR(Category, Format, ...) UE_LOG(Category, Error, TEXT("%s: %s"), *LOG_CALL_INFO, *FString::Printf(TEXT(Format), ##__VA_ARGS__))
35#define LOG_CLASS_INFO(Category, Format, ...) UE_LOG(Category, Log, TEXT("%s: ") TEXT(Format), *LOG_CLASS, ##__VA_ARGS__)
36#define LOG_CLASS_WARNING(Category, Format, ...) UE_LOG(Category, Warning, TEXT("%s: ") TEXT(Format), *LOG_CLASS, ##__VA_ARGS__)
37#define LOG_CLASS_ERROR(Category, Format, ...) UE_LOG(Category, Error, TEXT("%s: ") TEXT(Format), *LOG_CLASS, ##__VA_ARGS__)
41#define LOG_SCREEN(Format, ...) do { if (GEngine) GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, FString::Printf(TEXT(Format), ##__VA_ARGS__)); } while(0)
42#define LOG_SCREEN_ERROR(Format, ...) do { if (GEngine) GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT(Format), ##__VA_ARGS__)); } while(0)
43#define LOG_SCREEN_WARNING(Format, ...) do { if (GEngine) GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, FString::Printf(TEXT(Format), ##__VA_ARGS__)); } while(0)
DECLARE_LOG_CATEGORY_EXTERN(LogCK, Log, All)