chore: initialize UE 5.8 + UnLua game framework project
This commit is contained in:
commit
943af16954
397 files changed
+95588
No files matched your search
@@ -0,0 +1,26 @@
|
||||
---@class Framework.Log
|
||||
local Log = {}
|
||||
|
||||
local TAG = "[UnrealLuaDemo]"
|
||||
|
||||
local function FormatMessage(level, fmt, ...)
|
||||
local ok, msg = pcall(string.format, tostring(fmt), ...)
|
||||
if not ok then
|
||||
msg = tostring(fmt)
|
||||
end
|
||||
return string.format("%s[%s] %s", TAG, level, msg)
|
||||
end
|
||||
|
||||
function Log.Info(fmt, ...)
|
||||
print(FormatMessage("INFO", fmt, ...))
|
||||
end
|
||||
|
||||
function Log.Warn(fmt, ...)
|
||||
print(FormatMessage("WARN", fmt, ...))
|
||||
end
|
||||
|
||||
function Log.Error(fmt, ...)
|
||||
print(FormatMessage("ERROR", fmt, ...))
|
||||
end
|
||||
|
||||
return Log
|
||||
Reference in new issue
Block a user