mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-15 21:17:34 +00:00
add log error
This commit is contained in:
parent
06ceb7a734
commit
5c66279748
|
@ -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
|
Loading…
Reference in New Issue
Block a user