Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unlua的UNLUA_LOG基于宏NO_LOGGING作下区分 #705

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Plugins/UnLua/Source/UnLua/Private/UnLuaPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
#include "CoreUObject.h"
#include "UnLuaBase.h"

#if NO_LOGGING
#define UNLUA_LOG(L, CategoryName, Verbosity, Format, ...)
#define UNLUA_LOGWARNING(L, CategoryName, Verbosity, Format, ...)
#define UNLUA_LOGERROR(L, CategoryName, Verbosity, Format, ...)
#else
#define UNLUA_LOG(L, CategoryName, Verbosity, Format, ...) \
{\
FString LogMsg = FString::Printf(Format, ##__VA_ARGS__);\
Expand All @@ -40,6 +45,7 @@
UE_LOG(LogUnLua, Error, TEXT("%s%s"),*LogMsg,UTF8_TO_TCHAR(lua_tostring(L,-1))); \
lua_pop(L,1); \
}
#endif

#if STATS
DECLARE_STATS_GROUP(TEXT("UnLua"), STATGROUP_UnLua, STATCAT_Advanced);
Expand Down