aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.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/Grid/ScriptEngine/DotNetEngine/ScriptEngine.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 'OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs')
-rw-r--r--OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs19
1 files changed, 7 insertions, 12 deletions
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs
index cc6cde2..a45efe9 100644
--- a/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs
+++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs
@@ -40,6 +40,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
40 [Serializable] 40 [Serializable]
41 public class ScriptEngine : IRegionModule 41 public class ScriptEngine : IRegionModule
42 { 42 {
43 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
44
43 internal Scene World; 45 internal Scene World;
44 internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim 46 internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim
45 internal EventQueueManager m_EventQueueManager; // Executes events 47 internal EventQueueManager m_EventQueueManager; // Executes events
@@ -47,7 +49,6 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
47 internal AppDomainManager m_AppDomainManager; 49 internal AppDomainManager m_AppDomainManager;
48 internal LSLLongCmdHandler m_LSLLongCmdHandler; 50 internal LSLLongCmdHandler m_LSLLongCmdHandler;
49 51
50 private LogBase m_log;
51 52
52 public ScriptEngine() 53 public ScriptEngine()
53 { 54 {
@@ -55,19 +56,13 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
55 Common.mySE = this; 56 Common.mySE = this;
56 } 57 }
57 58
58 public LogBase Log 59 public void InitializeEngine(Scene Sceneworld)
59 {
60 get { return m_log; }
61 }
62
63 public void InitializeEngine(Scene Sceneworld, LogBase logger)
64 { 60 {
65 World = Sceneworld; 61 World = Sceneworld;
66 m_log = logger;
67 62
68 Log.Verbose("ScriptEngine", "DotNet & LSL ScriptEngine initializing"); 63 m_log.Info("[ScriptEngine]: DotNet & LSL ScriptEngine initializing");
69 64
70 //m_logger.Status("ScriptEngine", "InitializeEngine"); 65 //m_log.Info("[ScriptEngine]: InitializeEngine");
71 66
72 // Create all objects we'll be using 67 // Create all objects we'll be using
73 m_EventQueueManager = new EventQueueManager(this); 68 m_EventQueueManager = new EventQueueManager(this);
@@ -90,7 +85,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
90 //public void StartScript(string ScriptID, IScriptHost ObjectID) 85 //public void StartScript(string ScriptID, IScriptHost ObjectID)
91 //{ 86 //{
92 // this.myEventManager.TEMP_OBJECT_ID = ObjectID; 87 // this.myEventManager.TEMP_OBJECT_ID = ObjectID;
93 // Log.Status("ScriptEngine", "DEBUG FUNCTION: StartScript: " + ScriptID); 88 // m_log.Info("[ScriptEngine]: DEBUG FUNCTION: StartScript: " + ScriptID);
94 // myScriptManager.StartScript(ScriptID, ObjectID); 89 // myScriptManager.StartScript(ScriptID, ObjectID);
95 //} 90 //}
96 91
@@ -98,7 +93,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
98 93
99 public void Initialise(Scene scene, IConfigSource config) 94 public void Initialise(Scene scene, IConfigSource config)
100 { 95 {
101 InitializeEngine(scene, MainLog.Instance); 96 InitializeEngine(scene);
102 } 97 }
103 98
104 public void PostInitialise() 99 public void PostInitialise()