From bcf018a98c3e95825e21dc3d6b7fc6b0aa315e8f Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 12 May 2008 17:06:37 +0000 Subject: * Minor: Make some direct grid server console output into logged messages instead --- OpenSim/Grid/GridServer/GridServerBase.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'OpenSim/Grid') diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index 5517953..8adab1a 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs @@ -28,7 +28,9 @@ using System; using System.Collections.Generic; using System.IO; +using System.Reflection; using System.Timers; +using log4net; using Mono.Addins; using OpenSim.Framework; using OpenSim.Framework.Console; @@ -40,6 +42,8 @@ namespace OpenSim.Grid.GridServer /// public class GridServerBase : BaseOpenSimServer, conscmd_callback { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + protected GridConfig m_config; protected GridManager m_gridManager; protected List m_plugins = new List(); @@ -56,7 +60,7 @@ namespace OpenSim.Grid.GridServer public GridServerBase() { - m_console = new ConsoleBase("OpenGrid", this); + m_console = new ConsoleBase("GRID", this); MainConsole.Instance = m_console; } @@ -72,13 +76,13 @@ namespace OpenSim.Grid.GridServer public void Startup() { - m_console.Status("Starting...\n"); + m_log.Info("[GRID]: Starting..."); Config(); SetupGridManager(); - m_console.Status("[GRID]: Starting HTTP process"); + m_log.Info("[GRID]: Starting HTTP process"); m_httpServer = new BaseHttpServer(m_config.HttpPort); AddHttpHandlers(); @@ -87,7 +91,7 @@ namespace OpenSim.Grid.GridServer m_httpServer.Start(); - m_console.Status("[GRID]: Starting sim status checker"); + m_log.Info("[GRID]: Starting sim status checker"); Timer simCheckTimer = new Timer(3600000 * 3); // 3 Hours between updates. simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims); @@ -114,14 +118,13 @@ namespace OpenSim.Grid.GridServer protected void LoadGridPlugins() { - //m_console.Status("[GRIDPLUGINS]: Looking for plugins"); AddinManager.Initialize("."); AddinManager.Registry.Update(null); ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/GridServer"); foreach (TypeExtensionNode node in nodes) { - m_console.Status("[GRIDPLUGINS]: Loading OpenSim plugin " + node.Path); + m_log.Info("[GRID PLUGINS]: Loading OpenSim plugin " + node.Path); IGridPlugin plugin = (IGridPlugin)node.CreateInstance(); plugin.Initialise(this); m_plugins.Add(plugin); @@ -130,7 +133,7 @@ namespace OpenSim.Grid.GridServer protected virtual void SetupGridManager() { - m_console.Status("[GRID]: Connecting to Storage Server"); + m_log.Info("[DATA]: Connecting to Storage Server"); m_gridManager = new GridManager(); m_gridManager.AddPlugin(m_config.DatabaseProvider); m_gridManager.Config = m_config; -- cgit v1.1