Skip to content

Commit

Permalink
Merge 1c90375 into b9adff7
Browse files Browse the repository at this point in the history
  • Loading branch information
mrogaski committed Mar 28, 2020
2 parents b9adff7 + 1c90375 commit 42601eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions GreenWall.toc
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
## Interface: 80205
## Interface: 80300
## Title: GreenWall
## Notes: Common communication channel as a replacement for guild chat in guild confederations.
## Author: Mark Rogaski <stigg@aie-guild.org>
## Version: 1.10.1
## Version: 1.11.0-dev
## URL: https://github.com/AIE-Guild/GreenWall
## URL: https://www.curseforge.com/wow/addons/greenwall
## DefaultState: enabled
## SavedVariables: GreenWallAccount
## SavedVariablesPerCharacter: GreenWall,GreenWallMeta,GreenWallLog
## X-Category: Guild
## X-Date: 2019-09-24
## X-Date: 2020-03-27

Lib\Load.xml
Constants.lua
Expand Down
13 changes: 8 additions & 5 deletions Utility.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,18 @@ end
function gw.Debug(level, ...)
local function get_caller()
local s = debugstack(3, 1, 0)
local loc = strmatch(s, '([%a%._-]+:%d+): in function')
local fun = strmatch(s, 'in function \`([%a_-]+)\'')
return fun and loc .. '(' .. fun .. ')' or loc
local file, loc = strmatch(s, '%[string "(.+)"%]:(%d+): in function')
local f = strmatch(s, 'in function \`([%a_-]+)\'')
file = file == nil and "" or file
loc = loc == nil and "" or loc
f = f == nil and "?" or f
return format('%s:%s:%s', file, loc, f)
end

if gw.settings then
if level <= gw.settings:get('debug') then
local msg = string.format(unpack({...}))
local trace = format('[debug/%d@%s] %s', level, get_caller(), msg)
local msg = string.format(unpack({ ... }))
local trace = format('debug/%d [%s] %s', level, get_caller(), msg)
gw.Log(trace)
if gw.settings:get('verbose') then
DEFAULT_CHAT_FRAME:AddMessage(format('|cff009a7dGreenWall:|r |cff778899%s|r', trace))
Expand Down

0 comments on commit 42601eb

Please sign in to comment.