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