In testing some Addons I found that using LevelDebug the messages were not being printed correctly. I checked the CustomLevelDebug code and noticed that it differed from the CustomDebug code, it was missing a named parameter in the function definition that it checked later and also was checking to see that 2 values had been passed instead of just one.
Here are the differences:
Index: /Applications/Burning Crusade Closed Beta/Interface/Addons/!!!Libs/Ace2/AceDebug-2.0/AceDebug-2.0.lua
===================================================================
--- /Applications/Burning Crusade Closed Beta/Interface/Addons/!!!Libs/Ace2/AceDebug-2.0/AceDebug-2.0.lua (revision 17082)
+++ /Applications/Burning Crusade Closed Beta/Interface/Addons/!!!Libs/Ace2/AceDebug-2.0/AceDebug-2.0.lua (working copy)
@@ -99,7 +99,7 @@
return self.debuglevel
end
-function AceDebug:CustomLevelDebug(level, r, g, b, frame, delay, ...)
+function AceDebug:CustomLevelDebug(level, r, g, b, frame, delay, a1, ...)
if not self.debugging or not self.debuglevel then return end
AceDebug:argCheck(level, 1, "number")
if level < 1 or level > 3 then
@@ -110,7 +110,7 @@
local output = string.format("|cff7fff7f(DEBUG) %s:[%s.%3d]|r", tostring(self), date("%H:%M:%S"), math.fmod(GetTime(), 1) * 1000)
a1 = tostring(a1)
- if string.find(a1, "%%") and select('#', ...) >= 2 then
+ if string.find(a1, "%%") and select('#', ...) >= 1 then
for i = 1, select('#', ...) do
tmp[i] = tostring((select(i, ...)))
end
In testing some Addons I found that using LevelDebug the messages were not being printed correctly. I checked the CustomLevelDebug code and noticed that it differed from the CustomDebug code, it was missing a named parameter in the function definition that it checked later and also was checking to see that 2 values had been passed instead of just one.
Here are the differences: