diff options
author | Charles Krinke | 2009-02-22 20:52:55 +0000 |
---|---|---|
committer | Charles Krinke | 2009-02-22 20:52:55 +0000 |
commit | 8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49 (patch) | |
tree | 96a24a49de82056060dd9b7bab0cb209d5f1a129 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | Allow delivery of object messages gridwide (diff) | |
download | opensim-SC_OLD-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.zip opensim-SC_OLD-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.tar.gz opensim-SC_OLD-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.tar.bz2 opensim-SC_OLD-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.tar.xz |
Mantis#3218. Thank you kindly, TLaukkan (Tommil) for a patch that:
* Added log4net dependency to physxplugin in prebuild.xml.
* Added missing m_log fields to classes.
* Replaced Console.WriteLine with appropriate m_log.Xxxx
* Tested that nant test target runs succesfully.
* Tested that local opensim sandbox starts up without errors.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
4 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5455b53..bc113db 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -58,6 +58,7 @@ using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | |||
58 | using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | 58 | using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; |
59 | using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | 59 | using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; |
60 | using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; | 60 | using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; |
61 | using System.Reflection; | ||
61 | 62 | ||
62 | namespace OpenSim.Region.ScriptEngine.Shared.Api | 63 | namespace OpenSim.Region.ScriptEngine.Shared.Api |
63 | { | 64 | { |
@@ -66,6 +67,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
66 | /// </summary> | 67 | /// </summary> |
67 | public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi | 68 | public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi |
68 | { | 69 | { |
70 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
69 | protected IScriptEngine m_ScriptEngine; | 71 | protected IScriptEngine m_ScriptEngine; |
70 | protected SceneObjectPart m_host; | 72 | protected SceneObjectPart m_host; |
71 | protected uint m_localID; | 73 | protected uint m_localID; |
@@ -1135,7 +1137,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1135 | public LSL_Integer llGetStatus(int status) | 1137 | public LSL_Integer llGetStatus(int status) |
1136 | { | 1138 | { |
1137 | m_host.AddScriptLPS(1); | 1139 | m_host.AddScriptLPS(1); |
1138 | // Console.WriteLine(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); | 1140 | // m_log.Debug(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); |
1139 | switch (status) | 1141 | switch (status) |
1140 | { | 1142 | { |
1141 | case ScriptBaseClass.STATUS_PHYSICS: | 1143 | case ScriptBaseClass.STATUS_PHYSICS: |
@@ -2706,8 +2708,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2706 | msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.Guid; | 2708 | msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.Guid; |
2707 | msg.toAgentID = new Guid(user); // toAgentID.Guid; | 2709 | msg.toAgentID = new Guid(user); // toAgentID.Guid; |
2708 | msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here | 2710 | msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here |
2709 | // Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); | 2711 | // m_log.Debug("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); |
2710 | // Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); | 2712 | // m_log.Debug("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); |
2711 | msg.timestamp = (uint)Util.UnixTimeSinceEpoch();// timestamp; | 2713 | msg.timestamp = (uint)Util.UnixTimeSinceEpoch();// timestamp; |
2712 | //if (client != null) | 2714 | //if (client != null) |
2713 | //{ | 2715 | //{ |
@@ -7882,7 +7884,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7882 | } | 7884 | } |
7883 | catch(Exception e) | 7885 | catch(Exception e) |
7884 | { | 7886 | { |
7885 | Console.WriteLine("[LSL_API]: llRequestSimulatorData" + e.ToString()); | 7887 | m_log.Error("[LSL_API]: llRequestSimulatorData" + e.ToString()); |
7886 | return UUID.Zero.ToString(); | 7888 | return UUID.Zero.ToString(); |
7887 | } | 7889 | } |
7888 | } | 7890 | } |
@@ -9068,7 +9070,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9068 | System.Text.ASCIIEncoding enc = | 9070 | System.Text.ASCIIEncoding enc = |
9069 | new System.Text.ASCIIEncoding(); | 9071 | new System.Text.ASCIIEncoding(); |
9070 | string data = enc.GetString(a.Data); | 9072 | string data = enc.GetString(a.Data); |
9071 | //Console.WriteLine(data); | 9073 | //m_log.Debug(data); |
9072 | NotecardCache.Cache(id, data); | 9074 | NotecardCache.Cache(id, data); |
9073 | AsyncCommands. | 9075 | AsyncCommands. |
9074 | DataserverPlugin.DataserverReply(id.ToString(), | 9076 | DataserverPlugin.DataserverReply(id.ToString(), |
@@ -9114,7 +9116,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9114 | System.Text.ASCIIEncoding enc = | 9116 | System.Text.ASCIIEncoding enc = |
9115 | new System.Text.ASCIIEncoding(); | 9117 | new System.Text.ASCIIEncoding(); |
9116 | string data = enc.GetString(a.Data); | 9118 | string data = enc.GetString(a.Data); |
9117 | //Console.WriteLine(data); | 9119 | //m_log.Debug(data); |
9118 | NotecardCache.Cache(id, data); | 9120 | NotecardCache.Cache(id, data); |
9119 | AsyncCommands. | 9121 | AsyncCommands. |
9120 | DataserverPlugin.DataserverReply(id.ToString(), | 9122 | DataserverPlugin.DataserverReply(id.ToString(), |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 597592d..7834a83 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -842,7 +842,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
842 | for (i=0;i<JSON.Length; i++) | 842 | for (i=0;i<JSON.Length; i++) |
843 | { | 843 | { |
844 | 844 | ||
845 | // Console.WriteLine(""+JSON[i]); | 845 | // m_log.Debug(""+JSON[i]); |
846 | switch (JSON[i]) | 846 | switch (JSON[i]) |
847 | { | 847 | { |
848 | case '{': | 848 | case '{': |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs index 0654c07..2ed9295 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
58 | 58 | ||
59 | while (httpInfo != null) | 59 | while (httpInfo != null) |
60 | { | 60 | { |
61 | //System.Console.WriteLine("[AsyncLSL]:" + httpInfo.response_body + httpInfo.status); | 61 | //m_log.Debug("[AsyncLSL]:" + httpInfo.response_body + httpInfo.status); |
62 | 62 | ||
63 | // Deliver data to prim's remote_data handler | 63 | // Deliver data to prim's remote_data handler |
64 | // | 64 | // |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs index 91cef9b..d08790c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs | |||
@@ -108,7 +108,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
108 | // Time has passed? | 108 | // Time has passed? |
109 | if (ts.next < DateTime.Now.Ticks) | 109 | if (ts.next < DateTime.Now.Ticks) |
110 | { | 110 | { |
111 | //Console.WriteLine("Time has passed: Now: " + DateTime.Now.Ticks + ", Passed: " + ts.next); | 111 | //m_log.Debug("Time has passed: Now: " + DateTime.Now.Ticks + ", Passed: " + ts.next); |
112 | // Add it to queue | 112 | // Add it to queue |
113 | m_CmdManager.m_ScriptEngine.PostScriptEvent(ts.itemID, | 113 | m_CmdManager.m_ScriptEngine.PostScriptEvent(ts.itemID, |
114 | new EventParams("timer", new Object[0], | 114 | new EventParams("timer", new Object[0], |