A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
INYLogger.cpp File Reference
#include "Logging/INYLogger.h"
#include "CoreGlobals.h"
#include "Misc/OutputDevice.h"
#include "Misc/UObjectToken.h"
#include "Misc/FeedbackContext.h"
#include "GameFramework/PlayerController.h"
#include "Engine/Engine.h"
#include "Logging/MessageLog.h"
#include "Modules/ModuleManager.h"
Include dependency graph for INYLogger.cpp:

Go to the source code of this file.

Macros

#define NY_ARRAY_COUNT   ARRAY_COUNT
 
#define NY_GROWABLE_LOGF(SerializeFunc)
 

Macro Definition Documentation

◆ NY_ARRAY_COUNT

#define NY_ARRAY_COUNT   ARRAY_COUNT

Definition at line 21 of file INYLogger.cpp.

◆ NY_GROWABLE_LOGF

#define NY_GROWABLE_LOGF ( SerializeFunc)
Value:
int32 BufferSize = 1024; \
TCHAR* Buffer = NULL; \
int32 Result = -1; \
/* allocate some stack space to use on the first pass, which matches most strings */ \
TCHAR StackBuffer[512]; \
TCHAR* AllocatedBuffer = NULL; \
\
/* first, try using the stack buffer */ \
Buffer = StackBuffer; \
GET_VARARGS_RESULT( Buffer, NY_ARRAY_COUNT(StackBuffer), NY_ARRAY_COUNT(StackBuffer) - 1, Fmt, Fmt, Result ); \
\
/* if that fails, then use heap allocation to make enough space */ \
while(Result == -1) \
{ \
FMemory::SystemFree(AllocatedBuffer); \
/* We need to use malloc here directly as GMalloc might not be safe. */ \
Buffer = AllocatedBuffer = (TCHAR*) FMemory::SystemMalloc( BufferSize * sizeof(TCHAR) ); \
GET_VARARGS_RESULT( Buffer, BufferSize, BufferSize-1, Fmt, Fmt, Result ); \
BufferSize *= 2; \
}; \
Buffer[Result] = 0; \
; \
\
SerializeFunc; \
FMemory::SystemFree(AllocatedBuffer);
#define NY_ARRAY_COUNT
Definition INYLogger.cpp:21

Definition at line 28 of file INYLogger.cpp.