From bfbf25c542ac13b3056261064e14c15844bf94fe Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 25 Mar 2010 21:36:57 +0000 Subject: minor: Print out port that http servers are using do this in callers so that we know who is setting up these things --- OpenSim/Framework/MainServer.cs | 8 +++++++- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 2 -- OpenSim/Region/ClientStack/RegionApplicationBase.cs | 6 +++--- OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs | 12 ++++++------ OpenSim/Server/Base/HttpServerBase.cs | 3 +++ 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs index 84cc05e..1f5f208 100644 --- a/OpenSim/Framework/MainServer.cs +++ b/OpenSim/Framework/MainServer.cs @@ -25,13 +25,17 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using OpenSim.Framework.Servers.HttpServer; using System.Collections.Generic; +using System.Reflection; +using log4net; +using OpenSim.Framework.Servers.HttpServer; namespace OpenSim.Framework { public class MainServer { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static BaseHttpServer instance = null; private static Dictionary m_Servers = new Dictionary(); @@ -53,6 +57,8 @@ namespace OpenSim.Framework return m_Servers[port]; m_Servers[port] = new BaseHttpServer(port); + + m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port); m_Servers[port].Start(); return m_Servers[port]; diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 43a6757..a6e00c2 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -1580,7 +1580,6 @@ namespace OpenSim.Framework.Servers.HttpServer public void Start() { - m_log.Info("[BASE HTTP SERVER]: Starting up HTTP Server"); StartHTTP(); } @@ -1588,7 +1587,6 @@ namespace OpenSim.Framework.Servers.HttpServer { try { - m_log.Debug("[BASE HTTP SERVER]: Spawned main thread OK"); //m_httpListener = new HttpListener(); NotSocketErrors = 0; if (!m_ssl) diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 0ec87e5..e683821 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -98,10 +98,10 @@ namespace OpenSim.Region.ClientStack if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)) { - m_log.Error("[HTTP]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); + m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); } - m_log.Info("[REGION]: Starting HTTP server"); + m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort); m_httpServer.Start(); MainServer.Instance = m_httpServer; @@ -129,4 +129,4 @@ namespace OpenSim.Region.ClientStack return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier); } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs index 27b64bf..40ffcb4 100644 --- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs @@ -131,8 +131,8 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC { // Start http server // Attach xmlrpc handlers - m_log.Info("[REMOTE_DATA]: " + - "Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands."); + m_log.Info("[XML RPC MODULE]: " + + "Starting up XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands."); BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort); httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData); httpServer.Start(); @@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC // This should no longer happen, but the check is reasonable anyway if (null == m_openChannels) { - m_log.Warn("[RemoteDataReply] Attempt to open channel before initialization is complete"); + m_log.Warn("[XML RPC MODULE]: Attempt to open channel before initialization is complete"); return newChannel; } @@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC } else { - m_log.Warn("[RemoteDataReply]: Channel or message_id not found"); + m_log.Warn("[XML RPC MODULE]: Channel or message_id not found"); } } @@ -340,7 +340,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC } else { - m_log.Error("UNABLE TO REMOVE COMPLETED REQUEST"); + m_log.Error("[XML RPC MODULE]: UNABLE TO REMOVE COMPLETED REQUEST"); } } } @@ -728,4 +728,4 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC return ReqID; } } -} +} \ No newline at end of file diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs index 77184a4..9e4593e 100644 --- a/OpenSim/Server/Base/HttpServerBase.cs +++ b/OpenSim/Server/Base/HttpServerBase.cs @@ -71,6 +71,8 @@ namespace OpenSim.Server.Base return m_Servers[port]; m_Servers[port] = new BaseHttpServer(port); + + m_Log.InfoFormat("[SERVER]: Starting new HTTP server on port {0}", port); m_Servers[port].Start(); return m_Servers[port]; @@ -109,6 +111,7 @@ namespace OpenSim.Server.Base protected override void Initialise() { + m_Log.InfoFormat("[SERVER]: Starting HTTP server on port {0}", m_HttpServer.Port); m_HttpServer.Start(); if (MainConsole.Instance is RemoteConsole) -- cgit v1.1