add log error

This commit is contained in:
Linventif 2023-09-25 11:27:57 +02:00
parent 06ceb7a734
commit 5c66279748

View File

@ -2,8 +2,15 @@
// Functions
//
// Log
function gmInte.log(msg, debug)
if (debug && !gmInte.config.debug) then return end
//format: [2021-08-01 00:00:00] [INFO] msg
print("[" .. os.date("%Y-%m-%d %H:%M:%S") .. "] [Gmod Integration] " .. msg)
end
// Log Error
function gmInte.logError(msg, debug)
if (debug && !gmInte.config.debug) then return end
print("[" .. os.date("%Y-%m-%d %H:%M:%S") .. "] [Gmod Integration] [ERROR] " .. msg)
print(debug.traceback())
end