From b6b0bc7b32ec5009eb482d51d0e9ff711e6ec022 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Nov 2011 16:15:52 +0000 Subject: Add "debug http" command for currently simple extra debug logging of non-event queue inbound http requests to a simulator --- OpenSim/Region/Application/OpenSim.cs | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index ee26e4f..f4ed32e 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -242,6 +242,14 @@ namespace OpenSim + "If an avatar name is given then only packets from that avatar are logged", Debug); + m_console.Commands.AddCommand("region", false, "debug http", + "debug http ", + "Turn on inbound http request debugging for everything except the event queue (see debug eq)." + + "If level >= 2 then the handler used to service the request is logged.\n" + + "If level >= 1 then incoming HTTP requests are logged.\n" + + "If level <= 0 then no extra http logging is done.\n", + Debug); + m_console.Commands.AddCommand("region", false, "debug scene", "debug scene ", "Turn on scene debugging", Debug); @@ -889,10 +897,24 @@ namespace OpenSim } else { - MainConsole.Instance.Output("packet debug should be 0..255"); + MainConsole.Instance.Output("Usage: debug packet 0..255"); + } + } + + break; + + case "http": + if (args.Length == 3) + { + int newDebug; + if (int.TryParse(args[2], out newDebug)) + { + MainServer.Instance.DebugLevel = newDebug; + break; } } + MainConsole.Instance.Output("Usage: debug http 0..2"); break; case "scene": @@ -917,7 +939,7 @@ namespace OpenSim } else { - MainConsole.Instance.Output("debug scene (where inside <> is true/false)"); + MainConsole.Instance.Output("Usage: debug scene (where inside <> is true/false)"); } break; -- cgit v1.1 From 658d02b5e913bfa21b496515943f90ab25b6dac5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Nov 2011 16:56:31 +0000 Subject: Improve some of the debug help messages --- OpenSim/Region/Application/OpenSim.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index f4ed32e..d97583c 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -244,8 +244,8 @@ namespace OpenSim m_console.Commands.AddCommand("region", false, "debug http", "debug http ", - "Turn on inbound http request debugging for everything except the event queue (see debug eq)." - + "If level >= 2 then the handler used to service the request is logged.\n" + "Turn on inbound http request debugging for everything except the event queue (see debug eq).", + "If level >= 2 then the handler used to service the request is logged.\n" + "If level >= 1 then incoming HTTP requests are logged.\n" + "If level <= 0 then no extra http logging is done.\n", Debug); @@ -345,7 +345,7 @@ namespace OpenSim m_console.Commands.AddCommand("region", false, "backup", "backup", - "Persist objects to the database now", RunCommand); + "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", RunCommand); m_console.Commands.AddCommand("region", false, "create region", "create region [\"region name\"] ", -- cgit v1.1 From 2a9c9ae340e6ccf76412a03bd44af470558e2d93 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Nov 2011 21:53:15 +0000 Subject: Provide more user feedback when "debug http" is set --- OpenSim/Region/Application/OpenSim.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index d97583c..4b38a2e 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -894,6 +894,8 @@ namespace OpenSim if (int.TryParse(args[2], out newDebug)) { m_sceneManager.SetDebugPacketLevelOnCurrentScene(newDebug, name); + // We provide user information elsewhere if any clients had their debug level set. +// MainConsole.Instance.OutputFormat("Debug packet level set to {0}", newDebug); } else { @@ -910,6 +912,7 @@ namespace OpenSim if (int.TryParse(args[2], out newDebug)) { MainServer.Instance.DebugLevel = newDebug; + MainConsole.Instance.OutputFormat("Debug http level set to {0}", newDebug); break; } } @@ -945,7 +948,7 @@ namespace OpenSim break; default: - MainConsole.Instance.Output("Unknown debug"); + MainConsole.Instance.Output("Unknown debug command"); break; } } -- cgit v1.1