/trunk/FuBar_RecapFu/libs/AceDebug-2.0
--[[ |
--[[ |
Name: AceDebug-2.0 |
Revision: $Rev: 25921 $ |
Revision: $Rev: 1091 $ |
Developed by: The Ace Development Team (http://www.wowace.com/index.php/The_Ace_Development_Team) |
Inspired By: Ace 1.x by Turan (turan@gryphon.com) |
Website: http://www.wowace.com/ |
Documentation: http://www.wowace.com/index.php/AceDebug-2.0 |
SVN: http://svn.wowace.com/root/trunk/Ace2/AceDebug-2.0 |
SVN: http://svn.wowace.com/wowace/trunk/Ace2/AceDebug-2.0 |
Description: Mixin to allow for simple debugging capabilities. |
Dependencies: AceLibrary, AceOO-2.0 |
License: LGPL v2.1 |
]] |
local MAJOR_VERSION = "AceDebug-2.0" |
local MINOR_VERSION = "$Revision: 25921 $" |
local MINOR_VERSION = 90000 + tonumber(("$Revision: 1091 $"):match("(%d+)")) |
if not AceLibrary then error(MAJOR_VERSION .. " requires AceLibrary") end |
if not AceLibrary:IsNewVersion(MAJOR_VERSION, MINOR_VERSION) then return end |
if not success then geterrorhandler()(err:find("%.lua:%d+:") and err or (debugstack():match("\n(.-: )in.-\n") or "") .. err) end |
end |
local DEBUGGING, TOGGLE_DEBUGGING |
if GetLocale() == "frFR" then |
DEBUGGING = "D\195\169boguage" |
TOGGLE_DEBUGGING = "Activer/d\195\169sactiver le d\195\169boguage" |
TOGGLE_DEBUGGING = "ëë²ê¹ ê¸°ë¥ ì¬ì©í¨/ì¬ì©ìí¨" |
elseif GetLocale() == "zhTW" then |
DEBUGGING = "é¤é¯" |
TOGGLE_DEBUGGING = "åç¨/åç¨é¤é¯åè½" |
TOGGLE_DEBUGGING = "åç¨/åç¨é¤é¯åè½ã" |
elseif GetLocale() == "zhCN" then |
DEBUGGING = "\232\176\131\232\175\149" |
TOGGLE_DEBUGGING = "\229\144\175\231\148\168/\231\166\129\231\148\168 \232\176\131\232\175\149." |
elseif GetLocale() == "esES" then |
DEBUGGING = "Debugging" |
TOGGLE_DEBUGGING = "Activar/desactivar Debugging." |
elseif GetLocale() == "ruRU" then |
DEBUGGING = "ÐÑладка" |
TOGGLE_DEBUGGING = "Ðкл/ÐÑкл оÑÐ»Ð°Ð´ÐºÑ Ð´Ð»Ñ ÑÑого аддона." |
else -- enUS |
DEBUGGING = "Debugging" |
TOGGLE_DEBUGGING = "Toggle debugging for this addon." |
end |
local AceOO = AceLibrary:GetInstance("AceOO-2.0") |
local AceDebug = AceOO.Mixin {"Debug", "CustomDebug", "IsDebugging", "SetDebugging", "SetDebugLevel", "LevelDebug", "CustomLevelDebug", "GetDebugLevel"} |
local AceDebug = AceOO.Mixin { |
"Debug", |
"CustomDebug", |
"IsDebugging", |
"SetDebugging", |
"SetDebugLevel", |
"LevelDebug", |
"CustomLevelDebug", |
"GetDebugLevel", |
"GetDebugPrefix", |
} |
local function print(text, r, g, b, frame, delay) |
(frame or DEFAULT_CHAT_FRAME):AddMessage(text, r, g, b, 1, delay or 5) |
return |
end |
local output = ("|cff7fff7f(DEBUG) %s:[%s.%3d]|r"):format(tostring(self), date("%H:%M:%S"), (GetTime() % 1) * 1000) |
local output = self:GetDebugPrefix() |
a1 = tostring(a1) |
if a1:find("%%") and select('#', ...) >= 1 then |
self.debuglevel = level |
end |
function AceDebug:GetDebugPrefix() |
return ("|cff7fff7f(DEBUG) %s:[%s.%3d]|r"):format( tostring(self), date("%H:%M:%S"), (GetTime() % 1) * 1000) |
end |
function AceDebug:GetDebugLevel() |
return self.debuglevel |
end |
end |
if level > self.debuglevel then return end |
local output = ("|cff7fff7f(DEBUG) %s:[%s.%3d]|r"):format( tostring(self), date("%H:%M:%S"), (GetTime() % 1) * 1000) |
local output = self:GetDebugPrefix() |
a1 = tostring(a1) |
if a1:find("%%") and select('#', ...) >= 1 then |
## Interface: 30000 |
## X-Curse-Packaged-Version: r1096 |
## X-Curse-Project-Name: Ace2 |
## X-Curse-Project-ID: ace2 |
## X-Curse-Repository-ID: wow/ace2/mainline |
## Title: Lib: AceDebug-2.0 |
## Notes: AddOn development framework |
## Author: Ace Development Team |
## LoadOnDemand: 1 |
## X-Website: http://www.wowace.com |
## X-Category: Library |
## X-License: LGPL v2.1 + MIT for AceOO-2.0 |
## Dependencies: AceLibrary, AceOO-2.0 |
AceDebug-2.0.lua |