Skip to content

Commit

Permalink
Added curse project id
Browse files Browse the repository at this point in the history
Fixed a bug with debug log not disabling when debuglog is not found.
  • Loading branch information
Cidan committed Nov 25, 2023
1 parent d382e4f commit 8837614
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions BetterBags.toc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## SavedVariables: BetterBagsDB
## X-Date: @project-date-iso@
## X-License: MIT
## X-Curse-Project-ID: 942432
## OptionalDeps: LibStub, Masque, CallbackHandler-1.0, Ace3, LibSharedMedia-3.0, _DebugLog

libs\LibStub\LibStub.lua
Expand Down
3 changes: 2 additions & 1 deletion debug/debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ function debug:OnInitialize()
end

function debug:OnEnable()
print("BetterBags: debug mode enabled")
if DLAPI then
print("BetterBags: debug mode enabled")
DLAPI.RegisterFormat("bdi", debug._bdi)
DLAPI.SetFormat("BetterBags", "bdi")
end
Expand Down Expand Up @@ -113,6 +113,7 @@ function debug:Format(...)
end

function debug:Log(category, ...)
if not DLAPI then return end
DLAPI.DebugLog("BetterBags", format("%s~%s", category, debug:Format(...)))
end
debug:Enable()

0 comments on commit 8837614

Please sign in to comment.