Quantcast

Include date time in debug messages

BillLive [01-26-16 - 04:47]
Include date time in debug messages
Filename
Elementarist.lua
diff --git a/Elementarist.lua b/Elementarist.lua
index 2411110..03d956c 100755
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -172,9 +172,9 @@ Elementarist.events = {}
 function Elementarist:Debug(statictxt,msg)
 	if (ElementaristDB.DebugMode) and (Elementarist.DebugChat) then
 		if (msg) then
-			Elementarist.DebugChat:AddMessage( statictxt  .. " : " .. msg)
+			Elementarist.DebugChat:AddMessage( date("%I:%M:%S:  ") .. " " .. statictxt  .. " : " .. msg)
 		else
-			Elementarist.DebugChat:AddMessage( statictxt  .. " : " .. "<nil>")
+			Elementarist.DebugChat:AddMessage( date("%I:%M:%S:  ") .. statictxt  .. " : " .. "<nil>")
 		end
 	end
 end