Skip to content

Commit

Permalink
Fix bug where debug http level 6 could not be specified. Also convert…
Browse files Browse the repository at this point in the history
…s newlines at this level to '\n' to enable them to be logged.
  • Loading branch information
Justin Clark-Casey (justincc) committed Sep 29, 2012
1 parent 818379b commit f457952
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
Expand Up @@ -727,14 +727,14 @@ private void LogIncomingInDetail(OSHttpRequest request)
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"));
}
}

Expand Down
4 changes: 2 additions & 2 deletions OpenSim/Framework/Servers/MainServer.cs
Expand Up @@ -177,9 +177,9 @@ private static void HandleDebugHttpCommand(string module, string[] cmdparams)
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;
}

Expand Down

0 comments on commit f457952

Please sign in to comment.