diff options
author | Justin Clarke Casey | 2008-05-31 19:13:38 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-31 19:13:38 +0000 |
commit | 01f933c273c4b0005d5b3709f48b9e79c92b38ed (patch) | |
tree | c7048d720906ca49a0194f521006886a4f7035f3 | |
parent | * Ignored some bins and gens (diff) | |
download | opensim-SC-01f933c273c4b0005d5b3709f48b9e79c92b38ed.zip opensim-SC-01f933c273c4b0005d5b3709f48b9e79c92b38ed.tar.gz opensim-SC-01f933c273c4b0005d5b3709f48b9e79c92b38ed.tar.bz2 opensim-SC-01f933c273c4b0005d5b3709f48b9e79c92b38ed.tar.xz |
* 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
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/GridServer/GridServerBase.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 4 |
2 files changed, 9 insertions, 2 deletions
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 | |||
118 | 118 | ||
119 | protected void LoadGridPlugins() | 119 | protected void LoadGridPlugins() |
120 | { | 120 | { |
121 | // Temporary hack to stop mono-addins scanning warnings from coming out on the console | ||
122 | TextWriter oldOutput = Console.Out; | ||
123 | Console.SetOut(new StreamWriter(Stream.Null)); | ||
124 | |||
121 | AddinManager.Initialize("."); | 125 | AddinManager.Initialize("."); |
122 | AddinManager.Registry.Update(null); | 126 | AddinManager.Registry.Update(null); |
127 | |||
128 | // Returns the console.writelines back to the console's stream | ||
129 | Console.SetOut(oldOutput); | ||
123 | 130 | ||
124 | ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/GridServer"); | 131 | ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/GridServer"); |
125 | foreach (TypeExtensionNode node in nodes) | 132 | foreach (TypeExtensionNode node in nodes) |
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index bd18116..d790e41 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -157,14 +157,14 @@ namespace OpenSim | |||
157 | if (Directory.Exists("addin-db-001")) | 157 | if (Directory.Exists("addin-db-001")) |
158 | Directory.Delete("addin-db-001", true); | 158 | Directory.Delete("addin-db-001", true); |
159 | 159 | ||
160 | //This blocks the scanning warnings from outputing to the console. | 160 | // This blocks the scanning warnings from outputing to the console. |
161 | TextWriter oldOutput = Console.Out; | 161 | TextWriter oldOutput = Console.Out; |
162 | Console.SetOut(new StreamWriter(Stream.Null)); | 162 | Console.SetOut(new StreamWriter(Stream.Null)); |
163 | 163 | ||
164 | AddinManager.Initialize("."); | 164 | AddinManager.Initialize("."); |
165 | AddinManager.Registry.Update(null); | 165 | AddinManager.Registry.Update(null); |
166 | 166 | ||
167 | //Returns the console.writelines back to the console's stream | 167 | // Returns the console.writelines back to the console's stream |
168 | Console.SetOut(oldOutput); | 168 | Console.SetOut(oldOutput); |
169 | 169 | ||
170 | Application.iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); | 170 | Application.iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); |