From 8414ec942940cb90dd37c4b5a779e1e37c55d3c0 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 29 Sep 2012 02:38:21 +0100 Subject: [PATCH] Fix bug where debug http level 6 could not be specified. Also converts newlines at this level to '\n' to enable them to be logged. --- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 6 +++--- OpenSim/Framework/Servers/MainServer.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 8c29ad479f..370965160e 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -727,14 +727,14 @@ namespace OpenSim.Framework.Servers.HttpServer const int sampleLength = 80; char[] sampleChars = new char[sampleLength]; reader.Read(sampleChars, 0, sampleLength); - output = string.Format("[BASE HTTP SERVER]: {0}...", new string(sampleChars).Replace("\n", @"\n")); + output = new string(sampleChars); } else { - output = string.Format("[BASE HTTP SERVER]: {0}", reader.ReadToEnd()); + output = reader.ReadToEnd(); } - m_log.Debug(output); + m_log.DebugFormat("[BASE HTTP SERVER]: {0}...", output.Replace("\n", @"\n")); } } diff --git a/OpenSim/Framework/Servers/MainServer.cs b/OpenSim/Framework/Servers/MainServer.cs index 4b61b18fea..ae7d515e13 100644 --- a/OpenSim/Framework/Servers/MainServer.cs +++ b/OpenSim/Framework/Servers/MainServer.cs @@ -177,9 +177,9 @@ namespace OpenSim.Framework.Servers return; } - if (newDebug < 0 || newDebug > 5) + if (newDebug < 0 || newDebug > 6) { - MainConsole.Instance.OutputFormat("{0} is outside the valid debug level range of 0..5", newDebug); + MainConsole.Instance.OutputFormat("{0} is outside the valid debug level range of 0..6", newDebug); return; }