aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-24 22:08:34 +0000
committerJustin Clark-Casey (justincc)2011-11-24 22:08:34 +0000
commita58f5b2f6679bfb8565741afaead7e6d8dc8c299 (patch)
tree733cf5d704a8f5e95a03165515249a1286eb7a42 /OpenSim/Region/Framework/Scenes
parentcomment out a noisy log line I accidentally left in from the last commit (diff)
downloadopensim-SC_OLD-a58f5b2f6679bfb8565741afaead7e6d8dc8c299.zip
opensim-SC_OLD-a58f5b2f6679bfb8565741afaead7e6d8dc8c299.tar.gz
opensim-SC_OLD-a58f5b2f6679bfb8565741afaead7e6d8dc8c299.tar.bz2
opensim-SC_OLD-a58f5b2f6679bfb8565741afaead7e6d8dc8c299.tar.xz
When setting packet level logging via "debug packet", apply to all clients, not just root ones.
Also adds scene name and client type (root|child) to logged information.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs24
1 files changed, 10 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index eeb087f..82458e2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -448,29 +448,25 @@ namespace OpenSim.Region.Framework.Scenes
448 } 448 }
449 449
450 /// <summary> 450 /// <summary>
451 /// Set the debug packet level on the current scene. This level governs which packets are printed out to the 451 /// Set the debug packet level on each current scene. This level governs which packets are printed out to the
452 /// console. 452 /// console.
453 /// </summary> 453 /// </summary>
454 /// <param name="newDebug"></param> 454 /// <param name="newDebug"></param>
455 /// <param name="name">Name of avatar to debug</param> 455 /// <param name="name">Name of avatar to debug</param>
456 public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name) 456 public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name)
457 { 457 {
458 ForEachCurrentScene( 458 ForEachCurrentScene(scene =>
459 delegate(Scene scene) 459 scene.ForEachScenePresence(sp =>
460 { 460 {
461 scene.ForEachRootClient(delegate(IClientAPI client) 461 if (name == null || sp.Name == name)
462 { 462 {
463 if (name == null || client.Name == name) 463 m_log.DebugFormat(
464 { 464 "Packet debug for {0} ({1}) set to {2}",
465 m_log.DebugFormat("Packet debug for {0} {1} set to {2}", 465 sp.Name, sp.IsChildAgent ? "child" : "root", newDebug);
466 client.FirstName,
467 client.LastName,
468 newDebug);
469 466
470 client.DebugPacketLevel = newDebug; 467 sp.ControllingClient.DebugPacketLevel = newDebug;
471 } 468 }
472 }); 469 })
473 }
474 ); 470 );
475 } 471 }
476 472