* Add more status information when an oar is being saved
* Among other messages, a log entry is posted for every 50 assets added to the archive0.6.4-rc1
parent
3ad2fef2d3
commit
ff7b20bef1
|
@ -90,10 +90,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
// Write out control file
|
||||
archive.AddFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile());
|
||||
|
||||
m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
|
||||
|
||||
// Write out region settings
|
||||
string settingsPath
|
||||
= String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName);
|
||||
archive.AddFile(settingsPath, RegionSettingsSerializer.Serialize(m_scene.RegionInfo.RegionSettings));
|
||||
|
||||
m_log.InfoFormat("[ARCHIVER]: Added region settings to archive.");
|
||||
|
||||
// Write out terrain
|
||||
string terrainPath
|
||||
|
@ -103,6 +107,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
m_terrainModule.SaveToStream(terrainPath, ms);
|
||||
archive.AddFile(terrainPath, ms.ToArray());
|
||||
ms.Close();
|
||||
|
||||
m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive.");
|
||||
|
||||
// Write out scene object metadata
|
||||
foreach (SceneObjectGroup sceneObject in m_sceneObjects)
|
||||
|
@ -121,6 +127,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
|
||||
archive.AddFile(filename, serializedObject);
|
||||
}
|
||||
|
||||
m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive.");
|
||||
|
||||
// Write out assets
|
||||
AssetsArchiver assetsArchiver = new AssetsArchiver(assetsFound);
|
||||
|
|
|
@ -42,6 +42,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <value>
|
||||
/// Post a message to the log every x assets as a progress bar
|
||||
/// </value>
|
||||
private static int LOG_ASSET_LOAD_NOTIFICATION_INTERVAL = 50;
|
||||
|
||||
/// <summary>
|
||||
/// Archive assets
|
||||
/// </summary>
|
||||
|
@ -116,6 +121,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
{
|
||||
// It appears that gtar, at least, doesn't need the intermediate directory entries in the tar
|
||||
//archive.AddDir("assets");
|
||||
|
||||
int assetsAdded = 0;
|
||||
|
||||
foreach (UUID uuid in m_assets.Keys)
|
||||
{
|
||||
|
@ -137,7 +144,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
archive.AddFile(
|
||||
ArchiveConstants.ASSETS_PATH + uuid.ToString() + extension,
|
||||
asset.Data);
|
||||
|
||||
assetsAdded++;
|
||||
|
||||
if (assetsAdded % LOG_ASSET_LOAD_NOTIFICATION_INTERVAL == 0)
|
||||
m_log.InfoFormat("[ARCHIVER]: Added {0} assets to archive", assetsAdded);
|
||||
}
|
||||
|
||||
if (assetsAdded % LOG_ASSET_LOAD_NOTIFICATION_INTERVAL != 0)
|
||||
m_log.InfoFormat("[ARCHIVER]: Added {0} assets to archive", assetsAdded);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue