From 5c66279748a0b4bf3e2fe4dd3e5e1c1b05f78f3d Mon Sep 17 00:00:00 2001
From: Linventif <linventif@gmail.com>
Date: Mon, 25 Sep 2023 11:27:57 +0200
Subject: [PATCH] add log error

---
 lua/gmod_integration/shared/sh_main.lua | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lua/gmod_integration/shared/sh_main.lua b/lua/gmod_integration/shared/sh_main.lua
index d2d283d..ab63faf 100644
--- a/lua/gmod_integration/shared/sh_main.lua
+++ b/lua/gmod_integration/shared/sh_main.lua
@@ -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
\ No newline at end of file