minor: make logging messages consistent in BaseHttpServer

mysql-performance
Justin Clark-Casey (justincc) 2009-12-15 16:23:57 +00:00
parent ffff12f7c1
commit 57d60a95a2
1 changed files with 25 additions and 25 deletions

View File

@ -465,11 +465,11 @@ namespace OpenSim.Framework.Servers.HttpServer
catch (SocketException e) catch (SocketException e)
{ {
// This has to be here to prevent a Linux/Mono crash // This has to be here to prevent a Linux/Mono crash
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
} }
catch (IOException e) catch (IOException e)
{ {
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message); m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
} }
return; return;
} }
@ -548,7 +548,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (IOException e) catch (IOException e)
{ {
m_log.ErrorFormat("[BASE HTTP SERVER] HandleRequest() threw ", e); m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw ", e);
} }
catch (InvalidOperationException e) catch (InvalidOperationException e)
{ {
@ -763,7 +763,7 @@ namespace OpenSim.Framework.Servers.HttpServer
byte[] buf = Encoding.UTF8.GetBytes("Not found"); byte[] buf = Encoding.UTF8.GetBytes("Not found");
response.KeepAlive = false; response.KeepAlive = false;
m_log.ErrorFormat("[BASE HTTP SERVER] Handler not found for http request {0}", request.RawUrl); m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl);
response.SendChunked = false; response.SendChunked = false;
response.ContentLength64 = buf.Length; response.ContentLength64 = buf.Length;
@ -775,7 +775,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("[HTTPD]: Error - " + ex.Message); m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
} }
finally finally
{ {
@ -787,11 +787,11 @@ namespace OpenSim.Framework.Servers.HttpServer
catch (SocketException e) catch (SocketException e)
{ {
// This has to be here to prevent a Linux/Mono crash // This has to be here to prevent a Linux/Mono crash
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
} }
catch (IOException e) catch (IOException e)
{ {
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message); m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
} }
} }
return; return;
@ -812,7 +812,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("[HTTPD]: Error - " + ex.Message); m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
} }
finally finally
{ {
@ -824,11 +824,11 @@ namespace OpenSim.Framework.Servers.HttpServer
catch (SocketException e) catch (SocketException e)
{ {
// This has to be here to prevent a Linux/Mono crash // This has to be here to prevent a Linux/Mono crash
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
} }
catch (IOException e) catch (IOException e)
{ {
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message); m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
} }
} }
} }
@ -864,7 +864,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("[HTTPD]: Error - " + ex.Message); m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
} }
if (llsdRequest != null)// && m_defaultLlsdHandler != null) if (llsdRequest != null)// && m_defaultLlsdHandler != null)
@ -925,7 +925,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("[HTTPD]: Error - " + ex.Message); m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
} }
finally finally
{ {
@ -939,12 +939,12 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (IOException e) catch (IOException e)
{ {
m_log.DebugFormat("[BASE HTTP SERVER] LLSD IOException {0}.", e); m_log.DebugFormat("[BASE HTTP SERVER]: LLSD IOException {0}.", e);
} }
catch (SocketException e) catch (SocketException e)
{ {
// This has to be here to prevent a Linux/Mono crash // This has to be here to prevent a Linux/Mono crash
m_log.WarnFormat("[BASE HTTP SERVER] LLSD issue {0}.\nNOTE: this may be spurious on Linux.", e); m_log.WarnFormat("[BASE HTTP SERVER]: LLSD issue {0}.\nNOTE: this may be spurious on Linux.", e);
} }
} }
} }
@ -1482,11 +1482,11 @@ namespace OpenSim.Framework.Servers.HttpServer
catch (SocketException e) catch (SocketException e)
{ {
// This has to be here to prevent a Linux/Mono crash // This has to be here to prevent a Linux/Mono crash
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
} }
catch (IOException e) catch (IOException e)
{ {
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message); m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
} }
} }
} }
@ -1510,7 +1510,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("[HTTPD]: Error - " + ex.Message); m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
} }
finally finally
{ {
@ -1523,7 +1523,7 @@ namespace OpenSim.Framework.Servers.HttpServer
catch (SocketException e) catch (SocketException e)
{ {
// This has to be here to prevent a Linux/Mono crash // This has to be here to prevent a Linux/Mono crash
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
} }
} }
} }
@ -1546,7 +1546,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("[HTTPD]: Error - " + ex.Message); m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
} }
finally finally
{ {
@ -1566,7 +1566,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void Start() public void Start()
{ {
m_log.Info("[HTTPD]: Starting up HTTP Server"); m_log.Info("[BASE HTTP SERVER]: Starting up HTTP Server");
StartHTTP(); StartHTTP();
} }
@ -1574,7 +1574,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
try try
{ {
m_log.Info("[HTTPD]: Spawned main thread OK"); m_log.Debug("[BASE HTTP SERVER]: Spawned main thread OK");
//m_httpListener = new HttpListener(); //m_httpListener = new HttpListener();
NotSocketErrors = 0; NotSocketErrors = 0;
if (!m_ssl) if (!m_ssl)
@ -1614,8 +1614,8 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Error("[HTTPD]: Error - " + e.Message); m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message);
m_log.Error("[HTTPD]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?"); m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?");
// We want this exception to halt the entire server since in current configurations we aren't too // We want this exception to halt the entire server since in current configurations we aren't too
// useful without inbound HTTP. // useful without inbound HTTP.
@ -1636,7 +1636,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void httpServerException(object source, Exception exception) public void httpServerException(object source, Exception exception)
{ {
m_log.ErrorFormat("[HTTPSERVER]: {0} had an exception {1}", source.ToString(), exception.ToString()); m_log.ErrorFormat("[BASE HTTP SERVER]: {0} had an exception {1}", source.ToString(), exception.ToString());
/* /*
if (HTTPDRunning)// && NotSocketErrors > 5) if (HTTPDRunning)// && NotSocketErrors > 5)
{ {
@ -1662,7 +1662,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (NullReferenceException) catch (NullReferenceException)
{ {
m_log.Warn("[BASEHTTPSERVER]: Null Reference when stopping HttpServer."); m_log.Warn("[BASE HTTP SERVER]: Null Reference when stopping HttpServer.");
} }
} }