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/ScriptEngine/RemoteServer/ScriptEngine.cs | |
parent | Cut down on the number of packets sent during terraforming. Terraforming shou... (diff) | |
download | opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.zip opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2 opensim-SC-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/ScriptEngine/RemoteServer/ScriptEngine.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs index d0dc7ab..8d27251 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | |||
29 | using System; | 30 | using System; |
30 | using Nini.Config; | 31 | using Nini.Config; |
31 | using OpenSim.Framework.Console; | 32 | using OpenSim.Framework.Console; |
@@ -41,28 +42,27 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
41 | [Serializable] | 42 | [Serializable] |
42 | public class ScriptEngine : IRegionModule | 43 | public class ScriptEngine : IRegionModule |
43 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
44 | internal Scene World; | 47 | internal Scene World; |
45 | internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim | 48 | internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim |
46 | internal RemoteServer m_RemoteServer; // Handles connections to remote servers | 49 | internal RemoteServer m_RemoteServer; // Handles connections to remote servers |
47 | 50 | ||
48 | private LogBase m_log; | ||
49 | |||
50 | public ScriptEngine() | 51 | public ScriptEngine() |
51 | { | 52 | { |
52 | Common.mySE = this; | 53 | Common.mySE = this; |
53 | } | 54 | } |
54 | 55 | ||
55 | public LogBase Log | 56 | public log4net.ILog Log |
56 | { | 57 | { |
57 | get { return m_log; } | 58 | get { return m_log; } |
58 | } | 59 | } |
59 | 60 | ||
60 | public void InitializeEngine(Scene Sceneworld, LogBase logger) | 61 | public void InitializeEngine(Scene Sceneworld) |
61 | { | 62 | { |
62 | World = Sceneworld; | 63 | World = Sceneworld; |
63 | m_log = logger; | ||
64 | 64 | ||
65 | Log.Verbose("ScriptEngine", "RemoteEngine (Remote Script Server) initializing"); | 65 | m_log.Info("[ScriptEngine]: RemoteEngine (Remote Script Server) initializing"); |
66 | // Create all objects we'll be using | 66 | // Create all objects we'll be using |
67 | m_EventManager = new EventManager(this); | 67 | m_EventManager = new EventManager(this); |
68 | m_RemoteServer = new RemoteServer(); | 68 | m_RemoteServer = new RemoteServer(); |
@@ -74,12 +74,11 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
74 | // We are shutting down | 74 | // We are shutting down |
75 | } | 75 | } |
76 | 76 | ||
77 | |||
78 | #region IRegionModule | 77 | #region IRegionModule |
79 | 78 | ||
80 | public void Initialise(Scene scene, IConfigSource config) | 79 | public void Initialise(Scene scene, IConfigSource config) |
81 | { | 80 | { |
82 | InitializeEngine(scene, MainLog.Instance); | 81 | InitializeEngine(scene); |
83 | } | 82 | } |
84 | 83 | ||
85 | public void PostInitialise() | 84 | public void PostInitialise() |
@@ -101,6 +100,5 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
101 | } | 100 | } |
102 | 101 | ||
103 | #endregion | 102 | #endregion |
104 | |||
105 | } | 103 | } |
106 | } \ No newline at end of file | 104 | } |