From 6ed5283bc06a62f38eb517e67b975832b603bf61 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 5 Feb 2008 19:44:27 +0000 Subject: 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. --- .../ScriptEngine/RemoteServer/EventManager.cs | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs') diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs index 047ff2e..971982c 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs @@ -26,6 +26,7 @@ * */ /* Original code: Tedd Hansen */ + using System; using libsecondlife; using OpenSim.Framework; @@ -40,7 +41,6 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer [Serializable] internal class EventManager { - System.Collections.Generic.Dictionary remoteScript = new System.Collections.Generic.Dictionary(); TCPClient m_TCPClient; TRPC_Remote RPC; @@ -59,32 +59,28 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer RPC.ReceiveCommand += new TRPC_Remote.ReceiveCommandDelegate(RPC_ReceiveCommand); myScriptServerID = m_TCPClient.ConnectAndReturnID(remoteHost, remotePort); - myScriptEngine.Log.Verbose("RemoteEngine", "Hooking up to server events"); + myScriptEngine.Log.Info("[RemoteEngine]: Hooking up to server events"); //myScriptEngine.World.EventManager.OnObjectGrab += touch_start; myScriptEngine.World.EventManager.OnRezScript += OnRezScript; //myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; - - } void RPC_ReceiveCommand(int ID, string Command, params object[] p) { - myScriptEngine.Log.Notice("REMOTESERVER", "Received command: '" + Command + "'"); + myScriptEngine.Log.Info("[REMOTESERVER]: Received command: '" + Command + "'"); if (p != null) { for (int i = 0; i < p.Length; i++) { - myScriptEngine.Log.Notice("REMOTESERVER", "Param " + i + ": " + p[i].ToString()); + myScriptEngine.Log.Info("[REMOTESERVER]: Param " + i + ": " + p[i].ToString()); } } - } - public void OnRezScript(uint localID, LLUUID itemID, string script) { // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID - myScriptEngine.Log.Verbose("RemoteEngine", "Creating new script (with connection)"); + myScriptEngine.Log.Info("[RemoteEngine]: Creating new script (with connection)"); // Temp for now: We have one connection only - this is hardcoded in myScriptServerID RPC.SendCommand(myScriptServerID, "OnRezScript", localID, itemID.ToString(), script); @@ -92,18 +88,15 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer //ScriptServerInterfaces.ServerRemotingObject obj = myScriptEngine.m_RemoteServer.Connect("localhost", 1234); //remoteScript.Add(localID, obj); //remoteScript[localID].Events().OnRezScript(localID, itemID, script); - - } public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) { - //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient); + //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient); RPC.SendCommand(myScriptServerID, "touch_start", offsetPos, "How to transfer IClientAPI?"); } - // PLACEHOLDERS -- CODE WILL CHANGE! @@ -266,6 +259,5 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer //{ // remoteScript[localID].Events.http_response(localID, itemID); //} - } -} \ No newline at end of file +} -- cgit v1.1