Changeset

3462:d73ed7975d82

mod_storage_xmlarchive: Add some debug logging
author Kim Alvefur <zash@zash.se>
date Thu, 07 Feb 2019 15:26:03 +0100
parents 3461:b54e98d5c4a1
children 3463:2aaf93d2b219
files mod_storage_xmlarchive/mod_storage_xmlarchive.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Sun Feb 03 21:36:31 2019 +0100
+++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Thu Feb 07 15:26:03 2019 +0100
@@ -66,6 +66,7 @@
 			local items = dm.list_load(username .. "@" .. dates[d], self.host, self.store) or empty;
 			for i = 1, #items do
 				if items[i].id == id then
+					module:log("debug", "Found item!");
 					return d, i, items;
 				end
 			end
@@ -73,9 +74,11 @@
 				return; -- Assuming no duplicates
 			end
 		elseif date and date < dates[d] then
+			module:log("debug", "Skipping remaining dates after %s", date);
 			return; -- List is assumed to be sorted
 		end
 	end
+	module:log("debug", "Item not found");
 end
 
 function archive:find(username, query)