SLF Updates

This commit is contained in:
Chase Eller 2026-03-25 17:41:35 -04:00
parent 8252d42b6a
commit bf3e99a6fe
No known key found for this signature in database
GPG Key ID: 9233D42F495E657C
7 changed files with 36 additions and 8 deletions

View File

@ -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.

View File

@ -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",

View File

@ -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."
},

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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