diff options
author | Jeff Ames | 2008-02-05 19:44:27 +0000 |
---|---|---|
committer | Jeff Ames | 2008-02-05 19:44:27 +0000 |
commit | 6ed5283bc06a62f38eb517e67b975832b603bf61 (patch) | |
tree | e5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Region/Environment/Scenes/SceneManager.cs | |
parent | Cut down on the number of packets sent during terraforming. Terraforming shou... (diff) | |
download | opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.zip opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2 opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz |
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O.
This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneManager.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneManager.cs | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 1eac61b..7156428 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
38 | 38 | ||
39 | public class SceneManager | 39 | public class SceneManager |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | public event RestartSim OnRestartSim; | 43 | public event RestartSim OnRestartSim; |
42 | 44 | ||
43 | private readonly List<Scene> m_localScenes; | 45 | private readonly List<Scene> m_localScenes; |
@@ -98,8 +100,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
98 | 100 | ||
99 | public void HandleRestart(RegionInfo rdata) | 101 | public void HandleRestart(RegionInfo rdata) |
100 | { | 102 | { |
101 | MainLog.Instance.Error("SCENEMANAGER", | 103 | m_log.Error("[SCENEMANAGER]: Got Restart message for region:" + rdata.RegionName + " Sending up to main"); |
102 | "Got Restart message for region:" + rdata.RegionName + " Sending up to main"); | ||
103 | int RegionSceneElement = -1; | 104 | int RegionSceneElement = -1; |
104 | for (int i = 0; i < m_localScenes.Count; i++) | 105 | for (int i = 0; i < m_localScenes.Count; i++) |
105 | { | 106 | { |
@@ -146,7 +147,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
146 | } | 147 | } |
147 | else | 148 | else |
148 | { | 149 | { |
149 | MainLog.Instance.Error("REGION", "Unable to notify Other regions of this Region coming up"); | 150 | m_log.Error("[REGION]: Unable to notify Other regions of this Region coming up"); |
150 | } | 151 | } |
151 | } | 152 | } |
152 | 153 | ||
@@ -285,29 +286,29 @@ namespace OpenSim.Region.Environment.Scenes | |||
285 | return false; | 286 | return false; |
286 | } | 287 | } |
287 | 288 | ||
288 | public void SetDebugPacketOnCurrentScene(LogBase log, int newDebug) | 289 | public void SetDebugPacketOnCurrentScene(int newDebug) |
289 | { | 290 | { |
290 | ForEachCurrentScene(delegate(Scene scene) | 291 | ForEachCurrentScene(delegate(Scene scene) |
291 | { | 292 | { |
292 | List<EntityBase> EntitieList = scene.GetEntities(); | 293 | List<EntityBase> EntitieList = scene.GetEntities(); |
293 | 294 | ||
294 | foreach (EntityBase entity in EntitieList) | 295 | foreach (EntityBase entity in EntitieList) |
296 | { | ||
297 | if (entity is ScenePresence) | ||
295 | { | 298 | { |
296 | if (entity is ScenePresence) | 299 | ScenePresence scenePrescence = entity as ScenePresence; |
300 | if (!scenePrescence.IsChildAgent) | ||
297 | { | 301 | { |
298 | ScenePresence scenePrescence = entity as ScenePresence; | 302 | m_log.Error(String.Format("Packet debug for {0} {1} set to {2}", |
299 | if (!scenePrescence.IsChildAgent) | 303 | scenePrescence.Firstname, |
300 | { | 304 | scenePrescence.Lastname, |
301 | log.Error(String.Format("Packet debug for {0} {1} set to {2}", | 305 | newDebug)); |
302 | scenePrescence.Firstname, | ||
303 | scenePrescence.Lastname, | ||
304 | newDebug)); | ||
305 | 306 | ||
306 | scenePrescence.ControllingClient.SetDebug(newDebug); | 307 | scenePrescence.ControllingClient.SetDebug(newDebug); |
307 | } | ||
308 | } | 308 | } |
309 | } | 309 | } |
310 | }); | 310 | } |
311 | }); | ||
311 | } | 312 | } |
312 | 313 | ||
313 | public List<ScenePresence> GetCurrentSceneAvatars() | 314 | public List<ScenePresence> GetCurrentSceneAvatars() |