aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs15
1 files changed, 15 insertions, 0 deletions
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
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 /// <value>
46 /// Post a message to the log every x assets as a progress bar
47 /// </value>
48 private static int LOG_ASSET_LOAD_NOTIFICATION_INTERVAL = 50;
49
45 /// <summary> 50 /// <summary>
46 /// Archive assets 51 /// Archive assets
47 /// </summary> 52 /// </summary>
@@ -116,6 +121,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
116 { 121 {
117 // It appears that gtar, at least, doesn't need the intermediate directory entries in the tar 122 // It appears that gtar, at least, doesn't need the intermediate directory entries in the tar
118 //archive.AddDir("assets"); 123 //archive.AddDir("assets");
124
125 int assetsAdded = 0;
119 126
120 foreach (UUID uuid in m_assets.Keys) 127 foreach (UUID uuid in m_assets.Keys)
121 { 128 {
@@ -137,7 +144,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
137 archive.AddFile( 144 archive.AddFile(
138 ArchiveConstants.ASSETS_PATH + uuid.ToString() + extension, 145 ArchiveConstants.ASSETS_PATH + uuid.ToString() + extension,
139 asset.Data); 146 asset.Data);
147
148 assetsAdded++;
149
150 if (assetsAdded % LOG_ASSET_LOAD_NOTIFICATION_INTERVAL == 0)
151 m_log.InfoFormat("[ARCHIVER]: Added {0} assets to archive", assetsAdded);
140 } 152 }
153
154 if (assetsAdded % LOG_ASSET_LOAD_NOTIFICATION_INTERVAL != 0)
155 m_log.InfoFormat("[ARCHIVER]: Added {0} assets to archive", assetsAdded);
141 } 156 }
142 } 157 }
143} 158}