aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ScriptEngine/Shared/ScriptStructure.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ScriptEngine/Shared/ScriptStructure.cs')
-rw-r--r--OpenSim/ScriptEngine/Shared/ScriptStructure.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/ScriptEngine/Shared/ScriptStructure.cs b/OpenSim/ScriptEngine/Shared/ScriptStructure.cs
index 785040c..1095a8b 100644
--- a/OpenSim/ScriptEngine/Shared/ScriptStructure.cs
+++ b/OpenSim/ScriptEngine/Shared/ScriptStructure.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Text; 31using System.Text;
32using log4net;
32using OpenMetaverse; 33using OpenMetaverse;
33using OpenSim.Region.ScriptEngine.Interfaces; 34using OpenSim.Region.ScriptEngine.Interfaces;
34using OpenSim.Region.ScriptEngine.Shared.ScriptBase; 35using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
@@ -38,6 +39,8 @@ namespace OpenSim.ScriptEngine.Shared
38{ 39{
39 public struct ScriptStructure 40 public struct ScriptStructure
40 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43
41 public RegionInfoStructure RegionInfo; 44 public RegionInfoStructure RegionInfo;
42 public ScriptMetaData ScriptMetaData; 45 public ScriptMetaData ScriptMetaData;
43 46
@@ -91,8 +94,7 @@ namespace OpenSim.ScriptEngine.Shared
91 if (!InternalFunctions.ContainsKey(FunctionName)) 94 if (!InternalFunctions.ContainsKey(FunctionName))
92 { 95 {
93 // TODO: Send message in-world 96 // TODO: Send message in-world
94 //RegionInfo.Scene. 97 m_log.ErrorFormat("[{0}] Script function \"{1}\" was not found.", Name, FunctionName);
95 RegionInfo.Logger.ErrorFormat("[{0}] Script function \"{1}\" was not found.", Name, FunctionName);
96 return; 98 return;
97 } 99 }
98 100
@@ -103,7 +105,7 @@ namespace OpenSim.ScriptEngine.Shared
103 } 105 }
104 catch (Exception e) 106 catch (Exception e)
105 { 107 {
106 RegionInfo.Logger.ErrorFormat("[{0}] Execute \"{1}\" failed: {2}", Name, FunctionName, e.ToString()); 108 m_log.ErrorFormat("[{0}] Execute \"{1}\" failed: {2}", Name, FunctionName, e.ToString());
107 } 109 }
108 } 110 }
109 } 111 }
@@ -126,8 +128,8 @@ namespace OpenSim.ScriptEngine.Shared
126 if (!InternalFunctions.ContainsKey(mi.Name)) 128 if (!InternalFunctions.ContainsKey(mi.Name))
127 InternalFunctions.Add(mi.Name, Delegate.CreateDelegate(scriptObjectType, ScriptObject, mi)); 129 InternalFunctions.Add(mi.Name, Delegate.CreateDelegate(scriptObjectType, ScriptObject, mi));
128 else 130 else
129 RegionInfo.Logger.ErrorFormat("[{0}] Error: Script function \"{1}\" is already added. We do not support overloading.", 131 m_log.ErrorFormat("[{0}] Error: Script function \"{1}\" is already added. We do not support overloading.",
130 Name, mi.Name); 132 Name, mi.Name);
131 } 133 }
132 } 134 }
133 } 135 }