From 57d60a95a2c3a61bfcff9760b36088f13fa4bbd5 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 15 Dec 2009 16:23:57 +0000
Subject: minor: make logging messages consistent in BaseHttpServer

---
 .../Framework/Servers/HttpServer/BaseHttpServer.cs | 50 +++++++++++-----------
 1 file changed, 25 insertions(+), 25 deletions(-)

(limited to 'OpenSim')

diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 75cdeb4..6f41714 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -465,11 +465,11 @@ namespace OpenSim.Framework.Servers.HttpServer
                     catch (SocketException e)
                     {
                         // 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)
                     {
-                        m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message);
+                        m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
                     }
                     return;
                 }
@@ -548,7 +548,7 @@ namespace OpenSim.Framework.Servers.HttpServer
             }
             catch (IOException e)
             {
-                m_log.ErrorFormat("[BASE HTTP SERVER] HandleRequest() threw ", e);
+                m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw ", e);
             }
             catch (InvalidOperationException e)
             {
@@ -763,7 +763,7 @@ namespace OpenSim.Framework.Servers.HttpServer
                     byte[] buf = Encoding.UTF8.GetBytes("Not found");
                     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.ContentLength64 = buf.Length;
@@ -775,7 +775,7 @@ namespace OpenSim.Framework.Servers.HttpServer
                     }
                     catch (Exception ex)
                     {
-                        m_log.Warn("[HTTPD]: Error - " + ex.Message);
+                        m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
                     }
                     finally
                     {
@@ -787,11 +787,11 @@ namespace OpenSim.Framework.Servers.HttpServer
                         catch (SocketException e)
                         {
                             // 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)
                         {
-                            m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message);
+                            m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
                         }
                     }
                     return;
@@ -812,7 +812,7 @@ namespace OpenSim.Framework.Servers.HttpServer
             }
             catch (Exception ex)
             {
-                m_log.Warn("[HTTPD]: Error - " + ex.Message);
+                m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
             }
             finally
             {
@@ -824,11 +824,11 @@ namespace OpenSim.Framework.Servers.HttpServer
                 catch (SocketException e)
                 {
                     // 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)
                 {
-                    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)
             {
-                m_log.Warn("[HTTPD]: Error - " + ex.Message);
+                m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
             }
 
             if (llsdRequest != null)// && m_defaultLlsdHandler != null)
@@ -925,7 +925,7 @@ namespace OpenSim.Framework.Servers.HttpServer
             }
             catch (Exception ex)
             {
-                m_log.Warn("[HTTPD]: Error - " + ex.Message);
+                m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
             }
             finally
             {
@@ -939,12 +939,12 @@ namespace OpenSim.Framework.Servers.HttpServer
                 }
                 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)
                 {
                     // 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)
                 {
                     // 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)
                 {
-                    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)
             {
-                m_log.Warn("[HTTPD]: Error - " + ex.Message);
+                m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
             }
             finally
             {
@@ -1523,7 +1523,7 @@ namespace OpenSim.Framework.Servers.HttpServer
                 catch (SocketException e)
                 {
                     // 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)
             {
-                m_log.Warn("[HTTPD]: Error - " + ex.Message);
+                m_log.Warn("[BASE HTTP SERVER]: Error - " + ex.Message);
             }
             finally
             {
@@ -1566,7 +1566,7 @@ namespace OpenSim.Framework.Servers.HttpServer
 
         public void Start()
         {
-            m_log.Info("[HTTPD]: Starting up HTTP Server");
+            m_log.Info("[BASE HTTP SERVER]: Starting up HTTP Server");
             StartHTTP();
         }
 
@@ -1574,7 +1574,7 @@ namespace OpenSim.Framework.Servers.HttpServer
         {
             try
             {
-                m_log.Info("[HTTPD]: Spawned main thread OK");
+                m_log.Debug("[BASE HTTP SERVER]: Spawned main thread OK");
                 //m_httpListener = new HttpListener();
                 NotSocketErrors = 0;
                 if (!m_ssl)
@@ -1614,8 +1614,8 @@ namespace OpenSim.Framework.Servers.HttpServer
             }
             catch (Exception e)
             {
-                m_log.Error("[HTTPD]: 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]: Error - " + e.Message);
+                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 
                 // useful without inbound HTTP.
@@ -1636,7 +1636,7 @@ namespace OpenSim.Framework.Servers.HttpServer
 
         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)
             {
@@ -1662,7 +1662,7 @@ namespace OpenSim.Framework.Servers.HttpServer
             } 
             catch (NullReferenceException)
             {
-                m_log.Warn("[BASEHTTPSERVER]: Null Reference when stopping HttpServer.");
+                m_log.Warn("[BASE HTTP SERVER]: Null Reference when stopping HttpServer.");
             }
             
         }
-- 
cgit v1.1