From ec1901e4b8bcd1dd8487cd4b5ee48a7c58748f3d Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Sat, 12 May 2007 15:44:10 +0000
Subject: EXTERM-INATED. (Add warnings produced by WriteLine change have been
updated to include Log Priority)
---
OpenGridServices.GridServer/GridManager.cs | 16 ++++++++--------
OpenGridServices.GridServer/Main.cs | 12 ++++++------
2 files changed, 14 insertions(+), 14 deletions(-)
(limited to 'OpenGridServices.GridServer')
diff --git a/OpenGridServices.GridServer/GridManager.cs b/OpenGridServices.GridServer/GridManager.cs
index e41f3d5..02a6a50 100644
--- a/OpenGridServices.GridServer/GridManager.cs
+++ b/OpenGridServices.GridServer/GridManager.cs
@@ -24,10 +24,10 @@ namespace OpenGridServices.GridServer
/// The filename to the grid server plugin DLL
public void AddPlugin(string FileName)
{
- OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Storage: Attempting to load " + FileName);
+ OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Storage: Attempting to load " + FileName);
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
- OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
+ OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
foreach (Type pluginType in pluginAssembly.GetTypes())
{
if (!pluginType.IsAbstract)
@@ -39,7 +39,7 @@ namespace OpenGridServices.GridServer
IGridData plug = (IGridData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
plug.Initialise();
this._plugins.Add(plug.getName(), plug);
- OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Storage: Added IGridData Interface");
+ OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Storage: Added IGridData Interface");
}
typeInterface = null;
@@ -63,7 +63,7 @@ namespace OpenGridServices.GridServer
}
catch (Exception e)
{
- OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Storage: Unable to find region " + uuid.ToStringHyphenated() + " via " + kvp.Key);
+ OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL,"Storage: Unable to find region " + uuid.ToStringHyphenated() + " via " + kvp.Key);
}
}
return null;
@@ -84,7 +84,7 @@ namespace OpenGridServices.GridServer
}
catch (Exception e)
{
- OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key);
+ OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL,"Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key);
}
}
return null;
@@ -321,17 +321,17 @@ namespace OpenGridServices.GridServer
try
{
- OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Attempting to add a new region to the grid - " + _plugins.Count + " storage provider(s) registered.");
+ OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Attempting to add a new region to the grid - " + _plugins.Count + " storage provider(s) registered.");
foreach (KeyValuePair kvp in _plugins)
{
try
{
kvp.Value.AddProfile(TheSim);
- OpenSim.Framework.Console.MainConsole.Instance.WriteLine("New sim added to grid (" + TheSim.regionName + ")");
+ OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"New sim added to grid (" + TheSim.regionName + ")");
}
catch (Exception e)
{
- OpenSim.Framework.Console.MainConsole.Instance.WriteLine("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString());
+ OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString());
}
}
return "OK";
diff --git a/OpenGridServices.GridServer/Main.cs b/OpenGridServices.GridServer/Main.cs
index ba6c60d..532e15d 100644
--- a/OpenGridServices.GridServer/Main.cs
+++ b/OpenGridServices.GridServer/Main.cs
@@ -73,7 +73,7 @@ namespace OpenGridServices.GridServer
private void Work()
{
- m_console.WriteLine("\nEnter help for a list of commands\n");
+ m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"\nEnter help for a list of commands\n");
while (true)
{
@@ -91,16 +91,16 @@ namespace OpenGridServices.GridServer
public void Startup()
{
- m_console.WriteLine("Main.cs:Startup() - Loading configuration");
+ m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Loading configuration");
Cfg = this.LoadConfigDll(this.ConfigDll);
Cfg.InitConfig();
- m_console.WriteLine("Main.cs:Startup() - Connecting to Storage Server");
+ m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Connecting to Storage Server");
m_gridManager = new GridManager();
m_gridManager.AddPlugin(GridDll); // Made of win
m_gridManager.defaultRecvKey = Cfg.SimRecvKey;
- m_console.WriteLine("Main.cs:Startup() - Starting HTTP process");
+ m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting HTTP process");
BaseHttpServer httpServer = new BaseHttpServer(8001);
httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcLoginToSimulatorMethod);
@@ -127,7 +127,7 @@ namespace OpenGridServices.GridServer
httpServer.Start();
- m_console.WriteLine("Main.cs:Startup() - Starting sim status checker");
+ m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting sim status checker");
Timer simCheckTimer = new Timer( 300000 ); // 5 minutes
simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
@@ -204,7 +204,7 @@ namespace OpenGridServices.GridServer
switch (cmd)
{
case "help":
- m_console.WriteLine("shutdown - shutdown the grid (USE CAUTION!)");
+ m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"shutdown - shutdown the grid (USE CAUTION!)");
break;
case "shutdown":
--
cgit v1.1