From 9770cf778efa929255c40ec4a547aea3097b1edc Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 6 Nov 2008 20:38:04 +0000 Subject: * minor: Make some 'startup config failed to load' log messages more consistent --- .../Modules/World/WorldMap/MapImageModule.cs | 4 ++-- OpenSim/Region/Environment/Scenes/Scene.cs | 9 +++++---- OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs | 19 ++++++++++++++++++- 3 files changed, 25 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs index 556b843..b2f697c 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs @@ -85,9 +85,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap drawPrimVolume = startupConfig.GetBoolean("DrawPrimOnMapTile", drawPrimVolume); textureTerrain = startupConfig.GetBoolean("TextureOnMapTile", textureTerrain); } - catch (Exception) + catch { - m_log.Warn("Failed to load StartupConfig"); + m_log.Warn("[MAPTILE]: Failed to load StartupConfig"); } if (textureTerrain) diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 647682e..4621422 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -334,9 +334,9 @@ namespace OpenSim.Region.Environment.Scenes m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "DotNetEngine"); } - catch (Exception) + catch { - m_log.Warn("Failed to load StartupConfig"); + m_log.Warn("[SCENE]: Failed to load StartupConfig"); } } @@ -1307,6 +1307,7 @@ namespace OpenSim.Region.Environment.Scenes //tc = System.Environment.TickCount - tc; //m_log.Info("[MAPTILE]: Completed One row in " + tc + " ms"); } + m_log.Info("[MAPTILE]: Generating Maptile Step 1: Done in " + (System.Environment.TickCount - tc) + " ms"); bool drawPrimVolume = true; @@ -1316,9 +1317,9 @@ namespace OpenSim.Region.Environment.Scenes IConfig startupConfig = m_config.Configs["Startup"]; drawPrimVolume = startupConfig.GetBoolean("DrawPrimOnMapTile", true); } - catch (Exception) + catch { - m_log.Warn("Failed to load StartupConfig"); + m_log.Warn("[MAPTILE]: Failed to load StartupConfig"); } if (drawPrimVolume) diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs index 0ec4a8b..dd0ca8c 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs @@ -40,6 +40,19 @@ namespace OpenSim.Region.Environment.Scenes.Tests [TestFixture] public class SceneTests { + [SetUp] + public void Init() + { + try + { + log4net.Config.XmlConfigurator.Configure(); + } + catch + { + // I don't care, just leave log4net off + } + } + /// /// Test adding an object to a scene. Doesn't yet do what it says on the tin. /// @@ -56,7 +69,11 @@ namespace OpenSim.Region.Environment.Scenes.Tests StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", ""); IConfigSource configSource = new IniConfigSource(); - new Scene(regInfo, acm, cm, scs, null, sm, null, null, false, false, false, configSource, null); + Scene scene + = new Scene(regInfo, acm, cm, scs, null, sm, null, null, false, false, false, configSource, null); + + SceneObjectGroup sceneObject = new SceneObjectGroup(); + scene.AddNewSceneObject(sceneObject, false); } } } \ No newline at end of file -- cgit v1.1