diff --git a/CSTM-RESOURCE-GENERATOR-0.2.1.vsix b/CSTM-RESOURCE-GENERATOR-0.2.2.vsix similarity index 99% rename from CSTM-RESOURCE-GENERATOR-0.2.1.vsix rename to CSTM-RESOURCE-GENERATOR-0.2.2.vsix index 4d5b8b4..005425e 100644 Binary files a/CSTM-RESOURCE-GENERATOR-0.2.1.vsix and b/CSTM-RESOURCE-GENERATOR-0.2.2.vsix differ diff --git a/package.json b/package.json index 3afeef3..2bca73a 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "CSTM-RESOURCE-GENERATOR", "displayName": "CSTM Five Alive Resource Generator", "description": "This is an internal tool to help you in creating a new basic lua resource for FiveAlive", - "version": "0.2.1", + "version": "0.2.2", "engines": { "vscode": "^1.59.0" }, diff --git a/template/client/client.lua b/template/client/client.lua index 7709bd7..a428170 100644 --- a/template/client/client.lua +++ b/template/client/client.lua @@ -1,3 +1,4 @@ +local CLASS = "CHANGEME"--This is the name that the logging framework will use to display your logs in the correct manner --BEGIN CONFIG --Global Constants local LOG_LEVEL = 4 @@ -35,8 +36,14 @@ AddEventHandler(RESOURCE_CODE..":ConfigUpdate_cl", function(cfg) end) --SLF Server Logging Function DO NOT TOUCH unless you know what you are doing. function Log(message, logLevel) + local line = debug.getinfo(2, "l").currentline + local name = debug.getinfo(2, "n").name + if name == "fn" then + name = "Thread" + end + local value = "{"..CLASS.."."..name.."("..line..")} "..message if tonumber(LOG_LEVEL) >= logLevel then - exports.SLF:LogToClient(RESOURCE_CODE, logLevel, message) + exports.SLF:LogToClient(RESOURCE_CODE, logLevel, value) end end diff --git a/template/server/server.lua b/template/server/server.lua index 0d3deae..7de7d41 100644 --- a/template/server/server.lua +++ b/template/server/server.lua @@ -1,3 +1,4 @@ +local CLASS = "CHANGEME"--This is the name that the logging framework will use to display your logs in the correct manner --BEGIN CONFIG --GLOBAL CONSTANTS local LOG_LEVEL = 4 @@ -95,12 +96,24 @@ end) --SLF Server Logging Function DO NOT TOUCH unless you know what you are doing. function Log(message, logLevel) + local line = debug.getinfo(2, "l").currentline + local name = debug.getinfo(2, "n").name + if name == "fn" then + name = "Thread" + end + local value = "{"..CLASS.."."..name.."("..line..")} "..message if tonumber(LOG_LEVEL) >= logLevel then - exports.SLF:LogToServer(RESOURCE_CODE, logLevel, message) + exports.SLF:LogToServer(RESOURCE_CODE, logLevel, value) end end function DisLog(message) + local line = debug.getinfo(2, "l").currentline + local name = debug.getinfo(2, "n").name + if name == "fn" then + name = "Thread" + end + local value = "{"..CLASS.."."..name.."("..line..")} "..message exports.SLF:LogServerToDiscord(RESOURCE_CODE, message) end