* minor: Add a couple of code comments about enabling httpserver logging

0.6.2-post-fixes
Justin Clarke Casey 2009-01-13 16:56:10 +00:00
parent 1e365df495
commit 66637ad6e7
1 changed files with 14 additions and 10 deletions

View File

@ -1381,8 +1381,12 @@ namespace OpenSim.Framework.Servers
m_httpListener2 = new HttpServer.HttpListener(IPAddress.Any, (int)m_port); m_httpListener2 = new HttpServer.HttpListener(IPAddress.Any, (int)m_port);
m_httpListener2.ExceptionThrown += httpServerException; m_httpListener2.ExceptionThrown += httpServerException;
m_httpListener2.LogWriter = httpserverlog; m_httpListener2.LogWriter = httpserverlog;
m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor;
// Uncomment this line in addition to those in HttpServerLogWriter
// if you want more detailed trace information from the HttpServer
//m_httpListener2.UseTraceLogs = true;
m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor;
} }
else else
{ {
@ -1559,19 +1563,18 @@ namespace OpenSim.Framework.Servers
oreq = osreq; oreq = osreq;
oresp = osresp; oresp = osresp;
} }
} }
/// <summary>
/// Relays HttpServer log messages to our own logging mechanism.
/// </summary>
/// There is also a UseTraceLogs line in this file that can be uncommented for more detailed log information
public class HttpServerLogWriter : HttpServer.ILogWriter public class HttpServerLogWriter : HttpServer.ILogWriter
{ {
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public HttpServerLogWriter()
{
}
public void Write(object source, HttpServer.LogPrio priority, string message) public void Write(object source, HttpServer.LogPrio priority, string message)
{ {
return;
/* /*
switch (priority) switch (priority)
{ {
@ -1592,9 +1595,10 @@ namespace OpenSim.Framework.Servers
break; break;
default: default:
break; break;
} }
*/ */
return;
} }
} }