* 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,11 +90,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
// Write out control file
|
// Write out control file
|
||||||
archive.AddFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile());
|
archive.AddFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile());
|
||||||
|
|
||||||
|
m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
|
||||||
|
|
||||||
// Write out region settings
|
// Write out region settings
|
||||||
string settingsPath
|
string settingsPath
|
||||||
= String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName);
|
= String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName);
|
||||||
archive.AddFile(settingsPath, RegionSettingsSerializer.Serialize(m_scene.RegionInfo.RegionSettings));
|
archive.AddFile(settingsPath, RegionSettingsSerializer.Serialize(m_scene.RegionInfo.RegionSettings));
|
||||||
|
|
||||||
|
m_log.InfoFormat("[ARCHIVER]: Added region settings to archive.");
|
||||||
|
|
||||||
// Write out terrain
|
// Write out terrain
|
||||||
string terrainPath
|
string terrainPath
|
||||||
= String.Format("{0}{1}.r32", ArchiveConstants.TERRAINS_PATH, m_scene.RegionInfo.RegionName);
|
= String.Format("{0}{1}.r32", ArchiveConstants.TERRAINS_PATH, m_scene.RegionInfo.RegionName);
|
||||||
|
@ -104,6 +108,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
archive.AddFile(terrainPath, ms.ToArray());
|
archive.AddFile(terrainPath, ms.ToArray());
|
||||||
ms.Close();
|
ms.Close();
|
||||||
|
|
||||||
|
m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive.");
|
||||||
|
|
||||||
// Write out scene object metadata
|
// Write out scene object metadata
|
||||||
foreach (SceneObjectGroup sceneObject in m_sceneObjects)
|
foreach (SceneObjectGroup sceneObject in m_sceneObjects)
|
||||||
{
|
{
|
||||||
|
@ -122,6 +128,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
archive.AddFile(filename, serializedObject);
|
archive.AddFile(filename, serializedObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive.");
|
||||||
|
|
||||||
// Write out assets
|
// Write out assets
|
||||||
AssetsArchiver assetsArchiver = new AssetsArchiver(assetsFound);
|
AssetsArchiver assetsArchiver = new AssetsArchiver(assetsFound);
|
||||||
assetsArchiver.Archive(archive);
|
assetsArchiver.Archive(archive);
|
||||||
|
|
|
@ -42,6 +42,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
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>
|
/// <summary>
|
||||||
/// Archive assets
|
/// Archive assets
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -117,6 +122,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
// It appears that gtar, at least, doesn't need the intermediate directory entries in the tar
|
// It appears that gtar, at least, doesn't need the intermediate directory entries in the tar
|
||||||
//archive.AddDir("assets");
|
//archive.AddDir("assets");
|
||||||
|
|
||||||
|
int assetsAdded = 0;
|
||||||
|
|
||||||
foreach (UUID uuid in m_assets.Keys)
|
foreach (UUID uuid in m_assets.Keys)
|
||||||
{
|
{
|
||||||
AssetBase asset = m_assets[uuid];
|
AssetBase asset = m_assets[uuid];
|
||||||
|
@ -137,7 +144,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
archive.AddFile(
|
archive.AddFile(
|
||||||
ArchiveConstants.ASSETS_PATH + uuid.ToString() + extension,
|
ArchiveConstants.ASSETS_PATH + uuid.ToString() + extension,
|
||||||
asset.Data);
|
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