diff options
author | Jeff Ames | 2008-02-05 19:44:27 +0000 |
---|---|---|
committer | Jeff Ames | 2008-02-05 19:44:27 +0000 |
commit | 6ed5283bc06a62f38eb517e67b975832b603bf61 (patch) | |
tree | e5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs | |
parent | Cut down on the number of packets sent during terraforming. Terraforming shou... (diff) | |
download | opensim-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 'OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs')
-rw-r--r-- | OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs index d080ab8..6c2d940 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
38 | { | 38 | { |
39 | public class ScriptManager : IRegionModule, IExtensionScriptModule | 39 | public class ScriptManager : IRegionModule, IExtensionScriptModule |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | private readonly List<IScript> scripts = new List<IScript>(); | 43 | private readonly List<IScript> scripts = new List<IScript>(); |
42 | private Scene m_scene; | 44 | private Scene m_scene; |
43 | private readonly Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>(); | 45 | private readonly Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>(); |
@@ -48,12 +50,12 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
48 | { | 50 | { |
49 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); | 51 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); |
50 | // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. | 52 | // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. |
51 | MainLog.Instance.Verbose("SCRIPT", "Loading " + script.Key); | 53 | m_log.Info("[SCRIPT]: Loading " + script.Key); |
52 | script.Value.Initialise(scriptInfo); | 54 | script.Value.Initialise(scriptInfo); |
53 | scripts.Add(script.Value); | 55 | scripts.Add(script.Value); |
54 | } | 56 | } |
55 | 57 | ||
56 | MainLog.Instance.Verbose("SCRIPT", string.Format("Finished loading {0} script(s)", compiledscripts.Count)); | 58 | m_log.Info("[SCRIPT]: " + string.Format("Finished loading {0} script(s)", compiledscripts.Count)); |
57 | } | 59 | } |
58 | 60 | ||
59 | public ScriptManager() | 61 | public ScriptManager() |
@@ -71,7 +73,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
71 | 73 | ||
72 | public void Initialise(Scene scene, IConfigSource config) | 74 | public void Initialise(Scene scene, IConfigSource config) |
73 | { | 75 | { |
74 | MainLog.Instance.Verbose("SCRIPTMODULE", "Initialising Extensions Scripting Module"); | 76 | m_log.Info("[SCRIPTMODULE]: Initialising Extensions Scripting Module"); |
75 | m_scene = scene; | 77 | m_scene = scene; |
76 | 78 | ||
77 | m_scene.RegisterModuleInterface<IExtensionScriptModule>(this); | 79 | m_scene.RegisterModuleInterface<IExtensionScriptModule>(this); |
@@ -118,14 +120,14 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
118 | break; | 120 | break; |
119 | 121 | ||
120 | default: | 122 | default: |
121 | MainLog.Instance.Error("Unknown script command"); | 123 | m_log.Error("Unknown script command"); |
122 | break; | 124 | break; |
123 | } | 125 | } |
124 | } | 126 | } |
125 | 127 | ||
126 | public bool AddPreCompiledScript(IScript script) | 128 | public bool AddPreCompiledScript(IScript script) |
127 | { | 129 | { |
128 | MainLog.Instance.Verbose("SCRIPT", "Loading script " + script.Name); | 130 | m_log.Info("[SCRIPT]: Loading script " + script.Name); |
129 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); | 131 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); |
130 | // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. | 132 | // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. |
131 | script.Initialise(scriptInfo); | 133 | script.Initialise(scriptInfo); |