KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
NetworkLog.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
11COFFEELIBRARY_API DECLARE_LOG_CATEGORY_EXTERN(LogCoffeeNetwork, Log, All);
12
13COFFEELIBRARY_API void WriteToGameLog(const FString& Message);
14
15#define NET_CALLINFO FString::Printf(TEXT("[%s:%d] %s"), *FString(__FILE__).Right(FString(__FILE__).Find(TEXT("\\Source\\")) ? FString(__FILE__).Len() - FString(__FILE__).Find(TEXT("\\Source\\")) - 8 : FString(__FILE__).Len()), __LINE__, *FString(__FUNCTION__))
16
17#define NETWORK_LOG(fmt, ...) \
18 do { \
19 const FString __LogMessage__ = FString::Printf(fmt, ##__VA_ARGS__); \
20 const FString __Timestamp__ = FDateTime::Now().ToString(TEXT("%Y-%m-%d %H:%M:%S")); \
21 const FString __FullMessage__ = FString::Printf(TEXT("[%s] %s : %s"), *__Timestamp__, *NET_CALLINFO, *__LogMessage__); \
22 UE_LOG(LogCoffeeNetwork, Warning, TEXT("%s"), *__FullMessage__); \
23 WriteToGameLog(__FullMessage__); \
24 } while(0)
COFFEELIBRARY_API DECLARE_LOG_CATEGORY_EXTERN(LogCoffeeNetwork, Log, All)
COFFEELIBRARY_API void WriteToGameLog(const FString &Message)
주어진 메시지를 로그 파일에 기록합니다.