From ff7b20bef108bd129c7ff1fcd54cce37ac557132 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 5 Mar 2009 21:36:48 +0000
Subject: * 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
archive
---
.../Region/CoreModules/World/Archiver/AssetsArchiver.cs | 15 +++++++++++++++
1 file changed, 15 insertions(+)
(limited to 'OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs')
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
index abd90de..e863188 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
@@ -42,6 +42,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+ ///
+ /// Post a message to the log every x assets as a progress bar
+ ///
+ private static int LOG_ASSET_LOAD_NOTIFICATION_INTERVAL = 50;
+
///
/// Archive assets
///
@@ -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);
}
}
}
--
cgit v1.1