KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
GameLogging.h
이 파일의 문서화 페이지로 가기
1// Copyright (c) 2025 Doppleddiggong. All rights reserved. Unauthorized copying, modification, or distribution of this file, via any medium is strictly prohibited. Proprietary and confidential.
2
7#pragma once
8
9#include "CoreMinimal.h"
10#include "Logging/LogMacros.h"
11#include "Engine/Engine.h"
12#include "FLogWriter.h"
13#include "NetworkLog.h"
14
15COFFEELIBRARY_API DECLARE_LOG_CATEGORY_EXTERN(LogCoffee, Log, All);
16
17// Global log writer accessor
19{
20 return FLogWriter::Get();
21}
22
23// Current function/line info
24#define CALLINFO (FString(__FUNCTION__) + TEXT("(") + FString::FromInt(__LINE__) + TEXT(")"))
25
26// Quick debug: location only
27#define PRINTINFO() UE_LOG(LogCoffee, Warning, TEXT("%s"), *CALLINFO)
28
29// Log + file output
30#define PRINTLOG(fmt, ...) \
31do { \
32const FString __Timestamp__ = FDateTime::Now().ToString(TEXT("%Y-%m-%d %H:%M:%S.%s")); \
33const FString __LogMessage__ = FString::Printf(fmt, ##__VA_ARGS__); \
34const FString __FullMessage__ = FString::Printf( \
35TEXT("[%s] %s : %s"), \
36*__Timestamp__, \
37*CALLINFO, \
38*__LogMessage__ \
39); \
40UE_LOG(LogCoffee, Warning, TEXT("%s"), *__FullMessage__); \
41GetLogWriter().WriteLog(__FullMessage__); \
42} while(0)
43
44// Screen + log output
45#define PRINT_STRING(fmt, ...) \
46do { \
47const FString __msg__ = FString::Printf(fmt, ##__VA_ARGS__); \
48const FString __FullMessage__ = FString::Printf(TEXT("%s : %s"), *CALLINFO, *__msg__); \
49UE_LOG(LogCoffee, Warning, TEXT("%s"), *__FullMessage__); \
50GetLogWriter().WriteLog(__FullMessage__); \
51if (GEngine) { \
52GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Cyan, __msg__); \
53} \
54} while(0)
55
FArchive 클래스를 선언합니다.
COFFEELIBRARY_API DECLARE_LOG_CATEGORY_EXTERN(LogCoffee, Log, All)
FLogWriter & GetLogWriter()
Definition GameLogging.h:18
YiSan 전반에서 사용하는 공용 인터페이스를 선언합니다.
static FLogWriter & Get()