From 01f933c273c4b0005d5b3709f48b9e79c92b38ed Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sat, 31 May 2008 19:13:38 +0000 Subject: * 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 --- OpenSim/Grid/GridServer/GridServerBase.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Grid') diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index 263866a..a22f685 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs @@ -118,8 +118,15 @@ namespace OpenSim.Grid.GridServer 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.Registry.Update(null); + + // Returns the console.writelines back to the console's stream + Console.SetOut(oldOutput); ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/GridServer"); foreach (TypeExtensionNode node in nodes) -- cgit v1.1