aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/ModuleLoader.cs
diff options
context:
space:
mode:
authorJeff Ames2008-02-05 19:44:27 +0000
committerJeff Ames2008-02-05 19:44:27 +0000
commit6ed5283bc06a62f38eb517e67b975832b603bf61 (patch)
treee5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Region/Environment/ModuleLoader.cs
parentCut down on the number of packets sent during terraforming. Terraforming shou... (diff)
downloadopensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.zip
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O. This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/ModuleLoader.cs28
1 files changed, 14 insertions, 14 deletions
diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs
index 76ba14b..d4031d9 100644
--- a/OpenSim/Region/Environment/ModuleLoader.cs
+++ b/OpenSim/Region/Environment/ModuleLoader.cs
@@ -40,16 +40,16 @@ namespace OpenSim.Region.Environment
40{ 40{
41 public class ModuleLoader 41 public class ModuleLoader
42 { 42 {
43 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
44
43 public Dictionary<string, Assembly> LoadedAssemblys = new Dictionary<string, Assembly>(); 45 public Dictionary<string, Assembly> LoadedAssemblys = new Dictionary<string, Assembly>();
44 46
45 private readonly List<IRegionModule> m_loadedModules = new List<IRegionModule>(); 47 private readonly List<IRegionModule> m_loadedModules = new List<IRegionModule>();
46 private readonly Dictionary<string, IRegionModule> m_loadedSharedModules = new Dictionary<string, IRegionModule>(); 48 private readonly Dictionary<string, IRegionModule> m_loadedSharedModules = new Dictionary<string, IRegionModule>();
47 private readonly LogBase m_log;
48 private readonly IConfigSource m_config; 49 private readonly IConfigSource m_config;
49 50
50 public ModuleLoader(LogBase log, IConfigSource config) 51 public ModuleLoader(IConfigSource config)
51 { 52 {
52 m_log = log;
53 m_config = config; 53 m_config = config;
54 } 54 }
55 55
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Environment
78 DynamicTextureModule dynamicModule = new DynamicTextureModule(); 78 DynamicTextureModule dynamicModule = new DynamicTextureModule();
79 if (m_loadedSharedModules.ContainsKey(dynamicModule.Name)) 79 if (m_loadedSharedModules.ContainsKey(dynamicModule.Name))
80 { 80 {
81 m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule"); 81 m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule"));
82 } 82 }
83 else 83 else
84 { 84 {
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment
88 ChatModule chat = new ChatModule(); 88 ChatModule chat = new ChatModule();
89 if (m_loadedSharedModules.ContainsKey(chat.Name)) 89 if (m_loadedSharedModules.ContainsKey(chat.Name))
90 { 90 {
91 m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule"); 91 m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule"));
92 } 92 }
93 else 93 else
94 { 94 {
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment
98 InstantMessageModule imMod = new InstantMessageModule(); 98 InstantMessageModule imMod = new InstantMessageModule();
99 if (m_loadedSharedModules.ContainsKey(imMod.Name)) 99 if (m_loadedSharedModules.ContainsKey(imMod.Name))
100 { 100 {
101 m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule"); 101 m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule"));
102 } 102 }
103 else 103 else
104 { 104 {
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment
108 LoadImageURLModule loadMod = new LoadImageURLModule(); 108 LoadImageURLModule loadMod = new LoadImageURLModule();
109 if (m_loadedSharedModules.ContainsKey(loadMod.Name)) 109 if (m_loadedSharedModules.ContainsKey(loadMod.Name))
110 { 110 {
111 m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule"); 111 m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule"));
112 } 112 }
113 else 113 else
114 { 114 {
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment
118 AvatarFactoryModule avatarFactory = new AvatarFactoryModule(); 118 AvatarFactoryModule avatarFactory = new AvatarFactoryModule();
119 if (m_loadedSharedModules.ContainsKey(avatarFactory.Name)) 119 if (m_loadedSharedModules.ContainsKey(avatarFactory.Name))
120 { 120 {
121 m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule"); 121 m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule"));
122 } 122 }
123 else 123 else
124 { 124 {
@@ -128,7 +128,7 @@ namespace OpenSim.Region.Environment
128 XMLRPCModule xmlRpcMod = new XMLRPCModule(); 128 XMLRPCModule xmlRpcMod = new XMLRPCModule();
129 if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name)) 129 if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name))
130 { 130 {
131 m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule"); 131 m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule"));
132 } 132 }
133 else 133 else
134 { 134 {
@@ -186,17 +186,17 @@ namespace OpenSim.Region.Environment
186 186
187 if (modules.Length > 0) 187 if (modules.Length > 0)
188 { 188 {
189 m_log.Verbose("MODULES", "Found Module Library [{0}]", dllName); 189 m_log.Info(String.Format("[MODULES]: Found Module Library [{0}]", dllName));
190 foreach (IRegionModule module in modules) 190 foreach (IRegionModule module in modules)
191 { 191 {
192 if (!module.IsSharedModule) 192 if (!module.IsSharedModule)
193 { 193 {
194 m_log.Verbose("MODULES", " [{0}]: Initializing.", module.Name); 194 m_log.Info(String.Format("[MODULES]: [{0}]: Initializing.", module.Name));
195 InitializeModule(module, scene); 195 InitializeModule(module, scene);
196 } 196 }
197 else 197 else
198 { 198 {
199 m_log.Verbose("MODULES", " [{0}]: Loading Shared Module.", module.Name); 199 m_log.Info(String.Format("[MODULES]: [{0}]: Loading Shared Module.", module.Name));
200 LoadSharedModule(module); 200 LoadSharedModule(module);
201 } 201 }
202 } 202 }
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment
246 } 246 }
247 catch (BadImageFormatException) 247 catch (BadImageFormatException)
248 { 248 {
249 //m_log.Verbose("MODULES", "The file [{0}] is not a module assembly.", e.FileName); 249 //m_log.Info(String.Format("[MODULES]: The file [{0}] is not a module assembly.", e.FileName));
250 } 250 }
251 } 251 }
252 252
@@ -270,7 +270,7 @@ namespace OpenSim.Region.Environment
270 } 270 }
271 catch (ReflectionTypeLoadException) 271 catch (ReflectionTypeLoadException)
272 { 272 {
273 m_log.Verbose("MODULES", "Could not load types for [{0}].", pluginAssembly.FullName); 273 m_log.Info(String.Format("[MODULES]: Could not load types for [{0}].", pluginAssembly.FullName));
274 } 274 }
275 } 275 }
276 276