milo logging

This commit is contained in:
kepler155c@gmail.com
2019-03-16 21:02:49 -04:00
parent ed0dfcd473
commit ebd0896ee9
3 changed files with 19 additions and 8 deletions

View File

@@ -54,7 +54,10 @@ function ExportTask:cycle(context)
local _, item = next(items)
if item then
local count = math.min(item.count, itemDB:getMaxCount(item))
context.storage:export(node, entry.slot, count, item)
if context.storage:export(node, entry.slot, count, item) ~= count then
_G._debug('EXPORTER warning: Failed to export %s(%d) %s[%d]',
node.displayName or node.name, entry.slot, item.name, count)
end
break
end
end
@@ -67,6 +70,8 @@ function ExportTask:cycle(context)
if context.storage:export(node, nil, item.count, item) == 0 then
-- TODO: really shouldn't break here as there may be room in other slots
-- leaving for now for performance reasons
_G._debug('EXPORTER warning: Failed to export %s %s[%d]',
node.displayName or node.name, item.name, item.count)
break
end
end