* Propogate OpenSimMain hack to stop mono-addins scanning warnings to the grid managing

* This hack just temporarily sends console output to /dev/null when we make the relevant addins calls, restoring it afterwards
0.6.0-stable
Justin Clarke Casey 2008-05-31 19:13:38 +00:00
parent 721ee47149
commit 01f933c273
2 changed files with 9 additions and 2 deletions

View File

@ -118,8 +118,15 @@ namespace OpenSim.Grid.GridServer
protected void LoadGridPlugins() protected void LoadGridPlugins()
{ {
// Temporary hack to stop mono-addins scanning warnings from coming out on the console
TextWriter oldOutput = Console.Out;
Console.SetOut(new StreamWriter(Stream.Null));
AddinManager.Initialize("."); AddinManager.Initialize(".");
AddinManager.Registry.Update(null); AddinManager.Registry.Update(null);
// Returns the console.writelines back to the console's stream
Console.SetOut(oldOutput);
ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/GridServer"); ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/GridServer");
foreach (TypeExtensionNode node in nodes) foreach (TypeExtensionNode node in nodes)

View File

@ -157,14 +157,14 @@ namespace OpenSim
if (Directory.Exists("addin-db-001")) if (Directory.Exists("addin-db-001"))
Directory.Delete("addin-db-001", true); Directory.Delete("addin-db-001", true);
//This blocks the scanning warnings from outputing to the console. // This blocks the scanning warnings from outputing to the console.
TextWriter oldOutput = Console.Out; TextWriter oldOutput = Console.Out;
Console.SetOut(new StreamWriter(Stream.Null)); Console.SetOut(new StreamWriter(Stream.Null));
AddinManager.Initialize("."); AddinManager.Initialize(".");
AddinManager.Registry.Update(null); AddinManager.Registry.Update(null);
//Returns the console.writelines back to the console's stream // Returns the console.writelines back to the console's stream
Console.SetOut(oldOutput); Console.SetOut(oldOutput);
Application.iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); Application.iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini");