SLF Updates
This commit is contained in:
parent
8252d42b6a
commit
bf3e99a6fe
|
|
@ -25,4 +25,8 @@ I will use this area to keep up with what i did last.
|
|||
## [Release 1.1.3]
|
||||
|
||||
- Updated snippets for SLF to align with new coding processes
|
||||
- Updated templates for resource builder to build to new coding process
|
||||
- Updated templates for resource builder to build to new coding process
|
||||
|
||||
## [Release 1.1.4]
|
||||
|
||||
- Updated logging functions on all scripts and snippets to allow for the new on the fly log change.
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "cstmgames-fivem-snippets",
|
||||
"displayName": "CSTMGames FiveM Dev Tools",
|
||||
"description": "Development tools for FiveM",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"author": {
|
||||
"name": "Chase Eller",
|
||||
"email": "chase@cstmgames.com",
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
],
|
||||
"description": "Sets up command to be registered"
|
||||
},
|
||||
"SLF Functions and Vars for SERVER.": {
|
||||
"SLF Functions and Vars for server.": {
|
||||
"prefix": "SLFSERVER",
|
||||
"body": [
|
||||
"--GLOBAL CONSTANTS",
|
||||
|
|
@ -77,11 +77,15 @@
|
|||
" end",
|
||||
" local value = \"{\"..CLASS..\".\"..name..\"(\"..line..\")} \"..message",
|
||||
" exports.SLF:LogServerToDiscord(RESOURCE_CODE, message)",
|
||||
"end"
|
||||
"end",
|
||||
"RegisterNetEvent(RESOURCE_CODE..\":UpdateLogLevel\")",
|
||||
"AddEventHandler(RESOURCE_CODE..\":UpdateLogLevel\", function(num)",
|
||||
" LOG_LEVEL = num",
|
||||
"end)"
|
||||
],
|
||||
"description": "SLF Functions and Vars for SERVER."
|
||||
"description": "SLF Functions and Vars for server."
|
||||
},
|
||||
"SLF Functions and Vars for CLIENT.": {
|
||||
"SLF Functions and Vars for client.": {
|
||||
"prefix": "SLFCLIENT",
|
||||
"body": [
|
||||
"--GLOBAL CONSTANTS",
|
||||
|
|
@ -108,7 +112,11 @@
|
|||
" exports.SLF:LogToClient(RESOURCE_CODE, 4, value)",
|
||||
" Log(\"Warning line was logged without a level value... Logged it as debug as that is the safest route.\", 1)",
|
||||
" end",
|
||||
"end"
|
||||
"end",
|
||||
"RegisterNetEvent(RESOURCE_CODE..\":UpdateLogLevel\")",
|
||||
"AddEventHandler(RESOURCE_CODE..\":UpdateLogLevel\", function(num)",
|
||||
" LOG_LEVEL = num",
|
||||
"end)"
|
||||
],
|
||||
"description": "SLF Functions and Vars for client."
|
||||
},
|
||||
|
|
|
|||
|
|
@ -23,7 +23,10 @@ local function Log(message, logLevel)
|
|||
Log("Warning line was logged without a level value... Logged it as debug as that is the safest route.", 1)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent(RESOURCE_CODE..":UpdateLogLevel")
|
||||
AddEventHandler(RESOURCE_CODE..":UpdateLogLevel", function(num)
|
||||
LOG_LEVEL = num
|
||||
end)
|
||||
--LOCAL VARIABLES
|
||||
|
||||
--END CONFIG
|
||||
|
|
|
|||
|
|
@ -34,6 +34,11 @@ local function DisLog(message)
|
|||
local value = "{"..CLASS.."."..name.."("..line..")} "..message
|
||||
exports.SLF:LogServerToDiscord(RESOURCE_CODE, message)
|
||||
end
|
||||
|
||||
RegisterNetEvent(RESOURCE_CODE..":UpdateLogLevel")
|
||||
AddEventHandler(RESOURCE_CODE..":UpdateLogLevel", function(num)
|
||||
LOG_LEVEL = num
|
||||
end)
|
||||
--Global Variables
|
||||
|
||||
--LOCAL VARIABLES
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@ local function Log(message, logLevel)
|
|||
Log("Warning line was logged without a level value... Logged it as debug as that is the safest route.", 1)
|
||||
end
|
||||
end
|
||||
RegisterNetEvent(RESOURCE_CODE..":UpdateLogLevel")
|
||||
AddEventHandler(RESOURCE_CODE..":UpdateLogLevel", function(num)
|
||||
LOG_LEVEL = num
|
||||
end)
|
||||
|
||||
--LOCAL VARIABLES
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,10 @@ local function DisLog(message)
|
|||
local value = "{"..CLASS.."."..name.."("..line..")} "..message
|
||||
exports.SLF:LogServerToDiscord(RESOURCE_CODE, message)
|
||||
end
|
||||
RegisterNetEvent(RESOURCE_CODE..":UpdateLogLevel")
|
||||
AddEventHandler(RESOURCE_CODE..":UpdateLogLevel", function(num)
|
||||
LOG_LEVEL = num
|
||||
end)
|
||||
--Global Variables
|
||||
|
||||
--LOCAL VARIABLES
|
||||
|
|
|
|||
Loading…
Reference in New Issue