Diff

mod_migrate/mod_migrate.lua @ 2028:530bf8ef2e55

mod_migrate: Include debug data of what store is being migrated
author Kim Alvefur <zash@zash.se>
date Tue, 19 Jan 2016 19:52:45 +0100
parent 1985:7821a6986e68
child 2064:2a82c55762a7
line wrap: on
line diff
--- a/mod_migrate/mod_migrate.lua	Tue Jan 19 19:51:50 2016 +0100
+++ b/mod_migrate/mod_migrate.lua	Tue Jan 19 19:52:45 2016 +0100
@@ -22,7 +22,7 @@
 		target = assert(target:open(source_store, store_type));
 
 		local function migrate_user(username)
-			module:log("info", "Migrating data for %s", username);
+			module:log("info", "Migrating %s data for %s", source_store, username);
 			local data, err = storage:get(username);
 			assert(data or err==nil, err);
 			assert(target:set(username, data));
@@ -30,7 +30,7 @@
 
 		if store_type == "archive" then
 			function migrate_user(username)
-				module:log("info", "Migrating archive items for %s", username);
+				module:log("info", "Migrating %s archive items for %s", source_store, username);
 				local count, errs = 0, 0;
 				for id, item, when, with in storage:find(username) do
 					local ok, err = target:append(username, id, item, when, with);