27 lines
847 B
C
27 lines
847 B
C
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Logging/LogMacros.h"
|
|
|
|
GENERICINPUTSYSTEM_API FString GetGIPSLogContextString(const UObject* ContextObject = nullptr);
|
|
|
|
|
|
GENERICINPUTSYSTEM_API DECLARE_LOG_CATEGORY_EXTERN(LogGIPS, Log, All);
|
|
|
|
|
|
#define GIPS_LOG(Verbosity, Format, ...) \
|
|
{ \
|
|
UE_LOG(LogGIPS, Verbosity, TEXT("%S: %s"),__FUNCTION__, *FString::Printf(TEXT(Format), ##__VA_ARGS__)) \
|
|
}
|
|
|
|
#define GIPS_CLOG(Verbosity, Format, ...) \
|
|
{ \
|
|
UE_LOG(LogGIPS, Verbosity, TEXT("%S: ctx(%s) %s"),__FUNCTION__, *GetGIPSLogContextString(this), *FString::Printf(TEXT(Format), ##__VA_ARGS__)) \
|
|
}
|
|
|
|
#define GIPS_OWNED_CLOG(LogOwner,Verbosity, Format, ...) \
|
|
{ \
|
|
UE_LOG(LogGIPS, Verbosity, TEXT("%S: ctx(%s) %s"),__FUNCTION__, *GetGIPSLogContextString(LogOwner), *FString::Printf(TEXT(Format), ##__VA_ARGS__)) \
|
|
}
|