Add logging on import processes

This commit is contained in:
Dean Herbert
2018-05-29 16:14:09 +09:00
parent de8c4e6d56
commit 47d88a48a2
2 changed files with 10 additions and 2 deletions

View File

@ -190,7 +190,11 @@ namespace osu.Game.Database
var existing = CheckForExisting(item);
if (existing != null) return existing;
if (existing != null)
{
Logger.Log($"Found existing {typeof(TModel)} for {archive.Name} (ID {existing.ID}). Skipping import.", LoggingTarget.Database);
return existing;
}
item.Files = createFileInfos(archive, Files);
@ -205,9 +209,12 @@ namespace osu.Game.Database
throw;
}
}
Logger.Log($"Import of {archive.Name} successfully completed!", LoggingTarget.Database);
}
catch
{
Logger.Log($"Import of {archive.Name} failed and has been rolled back.", LoggingTarget.Database);
item = null;
}