Skip to content

Commit

Permalink
Reduce log spam
Browse files Browse the repository at this point in the history
  • Loading branch information
jhaakma committed Jun 14, 2024
1 parent 2c4b810 commit f51abab
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ local function registerCampfire(e)

--Legacy kettle Id
if e.reference.data.kettleId then
logger:info("Found campfire with kettleId, replacing with utensilId")
logger:debug("Found campfire with kettleId, replacing with utensilId")
e.reference.data.utensilId = e.reference.data.kettleId
e.reference.data.kettleId = nil
end
Expand All @@ -55,11 +55,11 @@ local function registerCampfire(e)
else
e.reference.data.utensilId = "ashfall_cooking_pot"
end
logger:info("Found campfire with a utensil and no utensilId, setting to %s",
logger:debug("Found campfire with a utensil and no utensilId, setting to %s",
e.reference.data.utensilId)
elseif oldCookingPots[e.reference.data.utensilId] then
e.reference.data.utensilId = "ashfall_cooking_pot"
logger:info("Found campfire with an invalid cooking pot, setting to %s",
logger:debug("Found campfire with an invalid cooking pot, setting to %s",
e.reference.data.utensilId)
end
end
Expand All @@ -76,7 +76,7 @@ local function registerCampfire(e)
local data = common.staticConfigs.utensils[e.reference.data.utensilId]
local capacity = data and data.capacity or 100
e.reference.data.waterCapacity = capacity
logger:info("Found campfire with a utensil and no water capacity, setting to %s. utensilID: %s",
logger:debug("Found campfire with a utensil and no water capacity, setting to %s. utensilID: %s",
capacity, e.reference.data.utensilId)
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,18 @@ end

---@param e unequippedEventData
event.register("unequipped", function(e)
logger:info("unequipped %s", e.item)
logger:trace("unequipped %s", e.item)
local isBackpack = Backpack.isBackpack(e.item)
if not isBackpack then
logger:info("not a backpack")
logger:trace("not a backpack")
return
end
local container = CarryableContainer:new{ item = e.item, itemData = e.itemData }
if not container then
logger:info("not a carryable container")
logger:trace("not a carryable container")
return
end
logger:info("- updating stats on unequip")
logger:trace("- updating stats on unequip")
container:updateStats()
end)

Expand Down
6 changes: 3 additions & 3 deletions Data Files/MWSE/mods/mer/ashfall/interop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -501,15 +501,15 @@ function Interop.registerWoodAxes(data)
logger:info("Registering Wood Axes")
for _, v in pairs(data) do
if type(v) == "string" then
logger:info("as string")
logger:trace("as string")
WoodAxe.registerForHarvesting(v)
elseif type(v) == "table" then
logger:info("as table")
logger:trace("as table")
local id = v.id
assert(id)
WoodAxe.registerForHarvesting(id)
if v.registerForBackpacks then
logger:info("Register for backpacks")
logger:trace("Register for backpacks")
WoodAxe.registerForBackpack(id)
end
else
Expand Down
2 changes: 1 addition & 1 deletion Data Files/MWSE/mods/mer/ashfall/items/backpack/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ end
---@param e objectCreatedEventData
event.register("objectCreated", function(e)
if e.copiedFrom and Backpack.isBackpack(e.copiedFrom) then
logger:info("objectCreated: registering backpack %s", e.object.id)
logger:debug("objectCreated: registering backpack %s", e.object.id)
Backpack.registerBackpack(e.object.id)
common.data.backpacks[e.object.id:lower()] = true
end
Expand Down

0 comments on commit f51abab

Please sign in to comment.
  翻译: