diff options
author | Justin Clarke Casey | 2009-03-05 21:36:48 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-03-05 21:36:48 +0000 |
commit | ff7b20bef108bd129c7ff1fcd54cce37ac557132 (patch) | |
tree | 2083addce51766ac803c2fbb45d6f000fc382952 /OpenSim/Region/CoreModules | |
parent | Prevent ICommander-generated subcommand trees from generating an exception (diff) | |
download | opensim-SC-ff7b20bef108bd129c7ff1fcd54cce37ac557132.zip opensim-SC-ff7b20bef108bd129c7ff1fcd54cce37ac557132.tar.gz opensim-SC-ff7b20bef108bd129c7ff1fcd54cce37ac557132.tar.bz2 opensim-SC-ff7b20bef108bd129c7ff1fcd54cce37ac557132.tar.xz |
* 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
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs | 15 |
2 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index f9d283b..b5aa0f3 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs | |||
@@ -90,10 +90,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
90 | // Write out control file | 90 | // Write out control file |
91 | archive.AddFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile()); | 91 | archive.AddFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile()); |
92 | 92 | ||
93 | m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); | ||
94 | |||
93 | // Write out region settings | 95 | // Write out region settings |
94 | string settingsPath | 96 | string settingsPath |
95 | = String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName); | 97 | = String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName); |
96 | archive.AddFile(settingsPath, RegionSettingsSerializer.Serialize(m_scene.RegionInfo.RegionSettings)); | 98 | archive.AddFile(settingsPath, RegionSettingsSerializer.Serialize(m_scene.RegionInfo.RegionSettings)); |
99 | |||
100 | m_log.InfoFormat("[ARCHIVER]: Added region settings to archive."); | ||
97 | 101 | ||
98 | // Write out terrain | 102 | // Write out terrain |
99 | string terrainPath | 103 | string terrainPath |
@@ -103,6 +107,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
103 | m_terrainModule.SaveToStream(terrainPath, ms); | 107 | m_terrainModule.SaveToStream(terrainPath, ms); |
104 | archive.AddFile(terrainPath, ms.ToArray()); | 108 | archive.AddFile(terrainPath, ms.ToArray()); |
105 | ms.Close(); | 109 | ms.Close(); |
110 | |||
111 | m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive."); | ||
106 | 112 | ||
107 | // Write out scene object metadata | 113 | // Write out scene object metadata |
108 | foreach (SceneObjectGroup sceneObject in m_sceneObjects) | 114 | foreach (SceneObjectGroup sceneObject in m_sceneObjects) |
@@ -121,6 +127,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
121 | 127 | ||
122 | archive.AddFile(filename, serializedObject); | 128 | archive.AddFile(filename, serializedObject); |
123 | } | 129 | } |
130 | |||
131 | m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive."); | ||
124 | 132 | ||
125 | // Write out assets | 133 | // Write out assets |
126 | AssetsArchiver assetsArchiver = new AssetsArchiver(assetsFound); | 134 | AssetsArchiver assetsArchiver = new AssetsArchiver(assetsFound); |
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 | } |