mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
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.
This commit is contained in:
@@ -41,6 +41,8 @@ namespace OpenSim.Region.Environment
|
||||
/// </summary>
|
||||
public class EstateManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_scene;
|
||||
private RegionInfo m_regInfo;
|
||||
|
||||
@@ -156,7 +158,7 @@ namespace OpenSim.Region.Environment
|
||||
{
|
||||
case "getinfo":
|
||||
|
||||
//MainLog.Instance.Verbose("ESTATE","CLIENT--->" + packet.ToString());
|
||||
//m_log.Info("[ESTATE]: CLIENT--->" + packet.ToString());
|
||||
sendRegionInfoPacketToAll();
|
||||
if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId))
|
||||
{
|
||||
@@ -223,7 +225,7 @@ namespace OpenSim.Region.Environment
|
||||
}
|
||||
break;
|
||||
default:
|
||||
MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
|
||||
m_log.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -283,7 +285,7 @@ namespace OpenSim.Region.Environment
|
||||
returnblock[8].Parameter = Helpers.StringToField("1");
|
||||
|
||||
packet.ParamList = returnblock;
|
||||
//MainLog.Instance.Verbose("ESTATE", "SIM--->" + packet.ToString());
|
||||
//m_log.Info("[ESTATE]: SIM--->" + packet.ToString());
|
||||
remote_client.OutPacket(packet, ThrottleOutPacketType.Task);
|
||||
|
||||
sendEstateManagerList(remote_client, packet);
|
||||
@@ -322,7 +324,7 @@ namespace OpenSim.Region.Environment
|
||||
returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++;
|
||||
}
|
||||
packet.ParamList = returnblock;
|
||||
//MainLog.Instance.Verbose("ESTATE", "SIM--->" + packet.ToString());
|
||||
//m_log.Info("[ESTATE]: SIM--->" + packet.ToString());
|
||||
remote_client.OutPacket(packet, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
@@ -364,10 +366,10 @@ namespace OpenSim.Region.Environment
|
||||
|
||||
default:
|
||||
|
||||
MainLog.Instance.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta\n" + packet.ToString());
|
||||
m_log.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta\n" + packet.ToString());
|
||||
break;
|
||||
}
|
||||
//MainLog.Instance.Error("EstateOwnerMessage: estateAccessDelta\n" + packet.ToString());
|
||||
//m_log.Error("EstateOwnerMessage: estateAccessDelta\n" + packet.ToString());
|
||||
|
||||
|
||||
}
|
||||
@@ -375,7 +377,7 @@ namespace OpenSim.Region.Environment
|
||||
{
|
||||
if (packet.ParamList.Length != 9)
|
||||
{
|
||||
MainLog.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length");
|
||||
m_log.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -438,7 +440,7 @@ namespace OpenSim.Region.Environment
|
||||
{
|
||||
if (packet.ParamList.Length != 9)
|
||||
{
|
||||
MainLog.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length");
|
||||
m_log.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -463,7 +465,7 @@ namespace OpenSim.Region.Environment
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainLog.Instance.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString());
|
||||
m_log.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Axiom.Math;
|
||||
@@ -38,7 +39,6 @@ using OpenSim.Region.Physics.Manager;
|
||||
|
||||
namespace OpenSim.Region.Environment.LandManagement
|
||||
{
|
||||
|
||||
#region LandManager Class
|
||||
|
||||
/// <summary>
|
||||
@@ -46,6 +46,8 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||
/// </summary>
|
||||
public class LandManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
#region Constants
|
||||
|
||||
//Land types set with flags in ParcelOverlay.
|
||||
@@ -57,7 +59,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||
public const byte LAND_TYPE_IS_FOR_SALE = (byte) 4; //Equals 00000100
|
||||
public const byte LAND_TYPE_IS_BEING_AUCTIONED = (byte) 5; //Equals 00000101
|
||||
|
||||
|
||||
//Flags that when set, a border on the given side will be placed
|
||||
//NOTE: North and East is assumable by the west and south sides (if land to east has a west border, then I have an east border; etc)
|
||||
//This took forever to figure out -- jeesh. /blame LL for even having to send these
|
||||
@@ -73,7 +74,6 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||
public const int LAND_SELECT_OBJECTS_GROUP = 4;
|
||||
public const int LAND_SELECT_OBJECTS_OTHER = 8;
|
||||
|
||||
|
||||
//These are other constants. Yay!
|
||||
public const int START_LAND_LOCAL_ID = 1;
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
//MainLog.Instance.Error("LandManager", "IncomingLandObjectsFromStorage: Exception: " + ex.ToString());
|
||||
//m_log.Error("[LandManager]: IncomingLandObjectsFromStorage: Exception: " + ex.ToString());
|
||||
//throw ex;
|
||||
//}
|
||||
}
|
||||
@@ -526,8 +526,7 @@ namespace OpenSim.Region.Environment.LandManagement
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Debug("LAND",
|
||||
"Skipped Land checks because avatar is out of bounds: " + e.Message);
|
||||
m_log.Debug("[LAND]: Skipped Land checks because avatar is out of bounds: " + e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,16 +40,16 @@ namespace OpenSim.Region.Environment
|
||||
{
|
||||
public class ModuleLoader
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public Dictionary<string, Assembly> LoadedAssemblys = new Dictionary<string, Assembly>();
|
||||
|
||||
private readonly List<IRegionModule> m_loadedModules = new List<IRegionModule>();
|
||||
private readonly Dictionary<string, IRegionModule> m_loadedSharedModules = new Dictionary<string, IRegionModule>();
|
||||
private readonly LogBase m_log;
|
||||
private readonly IConfigSource m_config;
|
||||
|
||||
public ModuleLoader(LogBase log, IConfigSource config)
|
||||
public ModuleLoader(IConfigSource config)
|
||||
{
|
||||
m_log = log;
|
||||
m_config = config;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Environment
|
||||
DynamicTextureModule dynamicModule = new DynamicTextureModule();
|
||||
if (m_loadedSharedModules.ContainsKey(dynamicModule.Name))
|
||||
{
|
||||
m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule");
|
||||
m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment
|
||||
ChatModule chat = new ChatModule();
|
||||
if (m_loadedSharedModules.ContainsKey(chat.Name))
|
||||
{
|
||||
m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule");
|
||||
m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment
|
||||
InstantMessageModule imMod = new InstantMessageModule();
|
||||
if (m_loadedSharedModules.ContainsKey(imMod.Name))
|
||||
{
|
||||
m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule");
|
||||
m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment
|
||||
LoadImageURLModule loadMod = new LoadImageURLModule();
|
||||
if (m_loadedSharedModules.ContainsKey(loadMod.Name))
|
||||
{
|
||||
m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule");
|
||||
m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment
|
||||
AvatarFactoryModule avatarFactory = new AvatarFactoryModule();
|
||||
if (m_loadedSharedModules.ContainsKey(avatarFactory.Name))
|
||||
{
|
||||
m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule");
|
||||
m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -128,7 +128,7 @@ namespace OpenSim.Region.Environment
|
||||
XMLRPCModule xmlRpcMod = new XMLRPCModule();
|
||||
if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name))
|
||||
{
|
||||
m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule");
|
||||
m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -186,17 +186,17 @@ namespace OpenSim.Region.Environment
|
||||
|
||||
if (modules.Length > 0)
|
||||
{
|
||||
m_log.Verbose("MODULES", "Found Module Library [{0}]", dllName);
|
||||
m_log.Info(String.Format("[MODULES]: Found Module Library [{0}]", dllName));
|
||||
foreach (IRegionModule module in modules)
|
||||
{
|
||||
if (!module.IsSharedModule)
|
||||
{
|
||||
m_log.Verbose("MODULES", " [{0}]: Initializing.", module.Name);
|
||||
m_log.Info(String.Format("[MODULES]: [{0}]: Initializing.", module.Name));
|
||||
InitializeModule(module, scene);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Verbose("MODULES", " [{0}]: Loading Shared Module.", module.Name);
|
||||
m_log.Info(String.Format("[MODULES]: [{0}]: Loading Shared Module.", module.Name));
|
||||
LoadSharedModule(module);
|
||||
}
|
||||
}
|
||||
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment
|
||||
}
|
||||
catch (BadImageFormatException)
|
||||
{
|
||||
//m_log.Verbose("MODULES", "The file [{0}] is not a module assembly.", e.FileName);
|
||||
//m_log.Info(String.Format("[MODULES]: The file [{0}] is not a module assembly.", e.FileName));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace OpenSim.Region.Environment
|
||||
}
|
||||
catch (ReflectionTypeLoadException)
|
||||
{
|
||||
m_log.Verbose("MODULES", "Could not load types for [{0}].", pluginAssembly.FullName);
|
||||
m_log.Info(String.Format("[MODULES]: Could not load types for [{0}].", pluginAssembly.FullName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
{
|
||||
public class BetaGridLikeMoneyModule: IRegionModule
|
||||
{
|
||||
|
||||
private LogBase m_log;
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Dictionary<ulong,Scene> m_scenel = new Dictionary<ulong,Scene>();
|
||||
|
||||
@@ -66,8 +65,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_log = MainLog.Instance;
|
||||
|
||||
m_gConfig = config;
|
||||
ReadConfigAndPopulate();
|
||||
|
||||
@@ -160,11 +157,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("MONEY", "Potential Fraud Warning, got money transfer request for avatar that isn't in this simulator - Details; Sender:" + e.sender.ToString() + " Reciver: " + e.reciever.ToString() + " Amount: " + e.amount.ToString());
|
||||
m_log.Warn("[MONEY]: Potential Fraud Warning, got money transfer request for avatar that isn't in this simulator - Details; Sender:" + e.sender.ToString() + " Reciver: " + e.reciever.ToString() + " Amount: " + e.amount.ToString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private bool doMoneyTranfer(LLUUID Sender, LLUUID Receiver, int amount)
|
||||
|
||||
@@ -43,8 +43,9 @@ namespace OpenSim.Region.Environment.Modules
|
||||
{
|
||||
public class ChatModule : IRegionModule, ISimChat
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private List<Scene> m_scenes = new List<Scene>();
|
||||
private LogBase m_log;
|
||||
|
||||
private int m_whisperdistance = 10;
|
||||
private int m_saydistance = 30;
|
||||
@@ -59,11 +60,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
internal object m_syncLogout = new object();
|
||||
private Thread m_irc_connector=null;
|
||||
|
||||
public ChatModule()
|
||||
{
|
||||
m_log = MainLog.Instance;
|
||||
}
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
lock (m_syncInit)
|
||||
@@ -159,7 +155,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("IRC", "NewClient exception trap:" + ex.ToString());
|
||||
m_log.Error("[IRC]: NewClient exception trap:" + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,13 +176,13 @@ namespace OpenSim.Region.Environment.Modules
|
||||
{
|
||||
m_last_leaving_user = clientName;
|
||||
m_irc.PrivMsg(m_irc.Nick, "Sim", "notices " + clientName + " left " + clientRegion);
|
||||
m_log.Verbose("IRC", "IRC watcher notices " + clientName + " left " + clientRegion);
|
||||
m_log.Info("[IRC]: IRC watcher notices " + clientName + " left " + clientRegion);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("IRC", "ClientLoggedOut exception trap:" + ex.ToString());
|
||||
m_log.Error("[IRC]: ClientLoggedOut exception trap:" + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,6 +315,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||
|
||||
internal class IRCChatModule
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string m_server = null;
|
||||
private uint m_port = 6668;
|
||||
private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot";
|
||||
@@ -341,7 +339,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
|
||||
private List<Scene> m_scenes = null;
|
||||
private List<Scene> m_last_scenes = null;
|
||||
private LogBase m_log;
|
||||
|
||||
public IRCChatModule(IConfigSource config)
|
||||
{
|
||||
@@ -388,9 +385,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MainLog.Instance.Verbose("CHAT", "No IRC config information, skipping IRC bridge configuration");
|
||||
m_log.Info("[CHAT]: No IRC config information, skipping IRC bridge configuration");
|
||||
}
|
||||
m_log = MainLog.Instance;
|
||||
}
|
||||
|
||||
public bool Connect(List<Scene> scenes)
|
||||
@@ -404,9 +400,9 @@ namespace OpenSim.Region.Environment.Modules
|
||||
if (m_last_scenes == null) { m_last_scenes = scenes; }
|
||||
|
||||
m_tcp = new TcpClient(m_server, (int)m_port);
|
||||
m_log.Verbose("IRC", "Connecting...");
|
||||
m_log.Info("[IRC]: Connecting...");
|
||||
m_stream = m_tcp.GetStream();
|
||||
m_log.Verbose("IRC", "Connected to " + m_server);
|
||||
m_log.Info("[IRC]: Connected to " + m_server);
|
||||
m_reader = new StreamReader(m_stream);
|
||||
m_writer = new StreamWriter(m_stream);
|
||||
|
||||
@@ -422,7 +418,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
m_writer.Flush();
|
||||
m_writer.WriteLine("JOIN " + m_channel);
|
||||
m_writer.Flush();
|
||||
m_log.Verbose("IRC", "Connection fully established");
|
||||
m_log.Info("[IRC]: Connection fully established");
|
||||
m_connected = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -475,16 +471,16 @@ namespace OpenSim.Region.Environment.Modules
|
||||
m_writer.WriteLine(m_privmsgformat, m_channel, from, region, msg);
|
||||
}
|
||||
m_writer.Flush();
|
||||
m_log.Verbose("IRC", "PrivMsg " + from + " in " + region + " :" + msg);
|
||||
m_log.Info("[IRC]: PrivMsg " + from + " in " + region + " :" + msg);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
m_log.Error("IRC", "Disconnected from IRC server.(PrivMsg)");
|
||||
m_log.Error("[IRC]: Disconnected from IRC server.(PrivMsg)");
|
||||
Reconnect();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("IRC", "PrivMsg exception trap:" + ex.ToString());
|
||||
m_log.Error("[IRC]: PrivMsg exception trap:" + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
//examines IRC commands and extracts any private messages
|
||||
// which will then be reboadcast in the Sim
|
||||
|
||||
m_log.Verbose("IRC", "ExtractMsg: " + input);
|
||||
m_log.Info("[IRC]: ExtractMsg: " + input);
|
||||
Dictionary<string, string> result = null;
|
||||
//string regex = @":(?<nick>\w*)!~(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)";
|
||||
string regex = @":(?<nick>\w*)!(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)";
|
||||
@@ -510,10 +506,10 @@ namespace OpenSim.Region.Environment.Modules
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Verbose("IRC", "Number of matches: " + matches.Count);
|
||||
m_log.Info("[IRC]: Number of matches: " + matches.Count);
|
||||
if (matches.Count > 0)
|
||||
{
|
||||
m_log.Verbose("IRC", "Number of groups: " + matches[0].Groups.Count);
|
||||
m_log.Info("[IRC]: Number of groups: " + matches[0].Groups.Count);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@@ -536,12 +532,12 @@ namespace OpenSim.Region.Environment.Modules
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
m_log.Error("IRC", "Disconnected from IRC server.(PingRun)");
|
||||
m_log.Error("[IRC]: Disconnected from IRC server.(PingRun)");
|
||||
Reconnect();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("IRC", "PingRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace);
|
||||
m_log.Error("[IRC]: PingRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -552,29 +548,29 @@ namespace OpenSim.Region.Environment.Modules
|
||||
LLVector3 pos = new LLVector3(128, 128, 20);
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null))
|
||||
try
|
||||
{
|
||||
while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null))
|
||||
{
|
||||
// Console.WriteLine(inputLine);
|
||||
if (inputLine.Contains(m_channel))
|
||||
{
|
||||
Dictionary<string, string> data = ExtractMsg(inputLine);
|
||||
Dictionary<string, string> data = ExtractMsg(inputLine);
|
||||
// Any chat ???
|
||||
if (data != null)
|
||||
{
|
||||
foreach (Scene m_scene in m_scenes)
|
||||
{
|
||||
m_scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
||||
{
|
||||
if (!avatar.IsChildAgent)
|
||||
{
|
||||
if (!avatar.IsChildAgent)
|
||||
{
|
||||
avatar.ControllingClient.SendChatMessage(
|
||||
Helpers.StringToField(data["msg"]), 255,
|
||||
pos, data["nick"],
|
||||
LLUUID.Zero);
|
||||
}
|
||||
});
|
||||
avatar.ControllingClient.SendChatMessage(
|
||||
Helpers.StringToField(data["msg"]), 255,
|
||||
pos, data["nick"],
|
||||
LLUUID.Zero);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -584,24 +580,24 @@ namespace OpenSim.Region.Environment.Modules
|
||||
// Was an command from the IRC server
|
||||
ProcessIRCCommand(inputLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Was an command from the IRC server
|
||||
ProcessIRCCommand(inputLine);
|
||||
}
|
||||
Thread.Sleep(150);
|
||||
}
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
m_log.Error("IRC", "ListenerRun IOException. Disconnected from IRC server ??? (ListenerRun)");
|
||||
Reconnect();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("IRC", "ListenerRun exception trap:" + ex.ToString()+"\n"+ex.StackTrace);
|
||||
}
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
m_log.Error("[IRC]: ListenerRun IOException. Disconnected from IRC server ??? (ListenerRun)");
|
||||
Reconnect();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("[IRC]: ListenerRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -626,27 +622,27 @@ namespace OpenSim.Region.Environment.Modules
|
||||
}
|
||||
catch (Exception ex) // IRC gate should not crash Sim
|
||||
{
|
||||
m_log.Error("IRC", "BroadcastSim Exception Trap:" + ex.ToString() + "\n" + ex.StackTrace);
|
||||
m_log.Error("[IRC]: BroadcastSim Exception Trap:" + ex.ToString() + "\n" + ex.StackTrace);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public enum ErrorReplies
|
||||
{
|
||||
NotRegistered = 451, // ":You have not registered"
|
||||
NicknameInUse = 433 // "<nick> :Nickname is already in use"
|
||||
}
|
||||
|
||||
public enum Replies
|
||||
{
|
||||
MotdStart = 375, // ":- <server> Message of the day - "
|
||||
Motd = 372, // ":- <text>"
|
||||
EndOfMotd = 376 // ":End of /MOTD command"
|
||||
|
||||
}
|
||||
|
||||
public void ProcessIRCCommand(string command)
|
||||
{
|
||||
//m_log.Verbose("IRC", "ProcessIRCCommand:"+command);
|
||||
//m_log.Info("[IRC]: ProcessIRCCommand:" + command);
|
||||
|
||||
string[] commArgs = new string[command.Split(' ').Length];
|
||||
string c_server = m_server;
|
||||
@@ -656,6 +652,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
{
|
||||
commArgs[0] = commArgs[0].Remove(0, 1);
|
||||
}
|
||||
|
||||
if (commArgs[1] == "002")
|
||||
{
|
||||
// fetch the correct servername
|
||||
@@ -668,7 +665,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
|
||||
if (commArgs[0] == "ERROR")
|
||||
{
|
||||
m_log.Error("IRC", "IRC SERVER ERROR:" + command);
|
||||
m_log.Error("[IRC]: IRC SERVER ERROR:" + command);
|
||||
}
|
||||
|
||||
if (commArgs[0] == "PING")
|
||||
@@ -695,7 +692,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
case (int)ErrorReplies.NicknameInUse:
|
||||
// Gen a new name
|
||||
m_nick = m_basenick + Util.RandomClass.Next(1, 99);
|
||||
m_log.Error("IRC", "IRC SERVER reports NicknameInUse, trying " + m_nick);
|
||||
m_log.Error("[IRC]: IRC SERVER reports NicknameInUse, trying " + m_nick);
|
||||
// Retry
|
||||
m_writer.WriteLine("NICK " + m_nick);
|
||||
m_writer.Flush();
|
||||
|
||||
@@ -40,8 +40,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
{
|
||||
public class FriendsModule : IRegionModule
|
||||
{
|
||||
|
||||
private LogBase m_log;
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_scene;
|
||||
|
||||
@@ -49,7 +48,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_log = MainLog.Instance;
|
||||
m_scene = scene;
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
scene.EventManager.OnGridInstantMessageToFriendsModule += OnGridInstantMessage;
|
||||
@@ -72,6 +70,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void OnInstantMessage(IClientAPI client,LLUUID fromAgentID,
|
||||
LLUUID fromAgentSession, LLUUID toAgentID,
|
||||
LLUUID imSessionID, uint timestamp, string fromAgentName,
|
||||
@@ -89,13 +88,13 @@ namespace OpenSim.Region.Environment.Modules
|
||||
|
||||
m_pendingFriendRequests.Add(friendTransactionID, fromAgentID);
|
||||
|
||||
m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message);
|
||||
m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message);
|
||||
GridInstantMessage msg = new GridInstantMessage();
|
||||
msg.fromAgentID = fromAgentID.UUID;
|
||||
msg.fromAgentSession = fromAgentSession.UUID;
|
||||
msg.toAgentID = toAgentID.UUID;
|
||||
msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here
|
||||
m_log.Verbose("FRIEND","Filling Session: " + msg.imSessionID.ToString());
|
||||
m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString());
|
||||
msg.timestamp = timestamp;
|
||||
if (client != null)
|
||||
{
|
||||
@@ -115,20 +114,18 @@ namespace OpenSim.Region.Environment.Modules
|
||||
msg.binaryBucket = binaryBucket;
|
||||
m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
|
||||
}
|
||||
if (dialog == (byte)39)
|
||||
{
|
||||
m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message);
|
||||
|
||||
}
|
||||
if (dialog == (byte)40)
|
||||
{
|
||||
m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message);
|
||||
}
|
||||
|
||||
// 39 == Accept Friendship
|
||||
if (dialog == (byte)39)
|
||||
{
|
||||
m_log.Info("[FRIEND]: 39 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message);
|
||||
}
|
||||
|
||||
// 40 == Decline Friendship
|
||||
|
||||
if (dialog == (byte)40)
|
||||
{
|
||||
m_log.Info("[FRIEND]: 40 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnApprovedFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders)
|
||||
@@ -160,6 +157,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
// TODO: Inform agent that the friend is online
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDenyFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders)
|
||||
{
|
||||
if (m_pendingFriendRequests.ContainsKey(transactionID))
|
||||
@@ -184,20 +182,15 @@ namespace OpenSim.Region.Environment.Modules
|
||||
msg.binaryBucket = new byte[0];
|
||||
m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
|
||||
m_pendingFriendRequests.Remove(transactionID);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void OnTerminateFriendship(IClientAPI client, LLUUID agent, LLUUID exfriendID)
|
||||
{
|
||||
m_scene.StoreRemoveFriendship(agent, exfriendID);
|
||||
// TODO: Inform the client that the ExFriend is offline
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void OnGridInstantMessage(GridInstantMessage msg)
|
||||
{
|
||||
// Trigger the above event handler
|
||||
@@ -206,16 +199,12 @@ namespace OpenSim.Region.Environment.Modules
|
||||
msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID,
|
||||
new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID),
|
||||
msg.binaryBucket);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
@@ -230,4 +219,4 @@ namespace OpenSim.Region.Environment.Modules
|
||||
get { return false; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,12 +39,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
public class InstantMessageModule : IRegionModule
|
||||
{
|
||||
private List<Scene> m_scenes = new List<Scene>();
|
||||
private LogBase m_log;
|
||||
|
||||
public InstantMessageModule()
|
||||
{
|
||||
m_log = MainLog.Instance;
|
||||
}
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
@@ -68,7 +62,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
uint ParentEstateID, LLVector3 Position, LLUUID RegionID,
|
||||
byte[] binaryBucket)
|
||||
{
|
||||
|
||||
bool FriendDialog = ((dialog == (byte)38) || (dialog == (byte)39) || (dialog == (byte)40));
|
||||
|
||||
// IM dialogs need to be pre-processed and have their sessionID filled by the server
|
||||
|
||||
@@ -39,6 +39,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||
{
|
||||
public class SunModule : IRegionModule
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private const double m_real_day = 24.0;
|
||||
private const int m_default_frame = 100;
|
||||
private int m_frame_mod;
|
||||
@@ -48,7 +50,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
private long m_start;
|
||||
|
||||
private Scene m_scene;
|
||||
private LogBase m_log;
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
@@ -69,7 +70,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
|
||||
m_dilation = (int) (m_real_day/m_day_length);
|
||||
m_scene = scene;
|
||||
m_log = MainLog.Instance;
|
||||
scene.EventManager.OnFrame += SunUpdate;
|
||||
scene.EventManager.OnNewClient += SunToClient;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
m_frame++;
|
||||
return;
|
||||
}
|
||||
// m_log.Verbose("SUN","I've got an update {0} => {1}", m_scene.RegionsInfo.RegionName, HourOfTheDay());
|
||||
// m_log.Info("[SUN]: I've got an update {0} => {1}", m_scene.RegionsInfo.RegionName, HourOfTheDay());
|
||||
List<ScenePresence> avatars = m_scene.GetAvatars();
|
||||
foreach (ScenePresence avatar in avatars)
|
||||
{
|
||||
@@ -191,4 +191,4 @@ namespace OpenSim.Region.Environment.Modules
|
||||
// // OutPacket(viewertime);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||
{
|
||||
public class TextureSender
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public int counter = 0;
|
||||
private AssetBase m_asset;
|
||||
public long DataPointer = 0;
|
||||
@@ -135,9 +137,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||
}
|
||||
catch (ArgumentOutOfRangeException)
|
||||
{
|
||||
MainLog.Instance.Error("TEXTURE",
|
||||
"Unable to separate texture into multiple packets: Array bounds failure on asset:" +
|
||||
m_asset.FullID.ToString() );
|
||||
m_log.Error("[TEXTURE]: Unable to separate texture into multiple packets: Array bounds failure on asset:" +
|
||||
m_asset.FullID.ToString() );
|
||||
return;
|
||||
}
|
||||
RequestUser.OutPacket(im, ThrottleOutPacketType.Texture);
|
||||
|
||||
@@ -75,6 +75,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||
{
|
||||
public class XMLRPCModule : IRegionModule, IXMLRPC
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_scene;
|
||||
private Queue<RPCRequestInfo> rpcQueue = new Queue<RPCRequestInfo>();
|
||||
private object XMLRPCListLock = new object();
|
||||
@@ -83,7 +85,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
private int RemoteReplyScriptTimeout = 900;
|
||||
private int m_remoteDataPort = 0;
|
||||
private List<Scene> m_scenes = new List<Scene>();
|
||||
private LogBase m_log;
|
||||
|
||||
// <channel id, RPCChannelInfo>
|
||||
private Dictionary<LLUUID, RPCChannelInfo> m_openChannels;
|
||||
@@ -91,11 +92,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
// <channel id, RPCRequestInfo>
|
||||
private Dictionary<LLUUID, RPCRequestInfo> m_pendingResponse;
|
||||
|
||||
public XMLRPCModule()
|
||||
{
|
||||
m_log = MainLog.Instance;
|
||||
}
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
try
|
||||
@@ -123,8 +119,8 @@ namespace OpenSim.Region.Environment.Modules
|
||||
|
||||
// Start http server
|
||||
// Attach xmlrpc handlers
|
||||
m_log.Verbose("REMOTE_DATA",
|
||||
"Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands.");
|
||||
m_log.Info("[REMOTE_DATA]: " +
|
||||
"Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands.");
|
||||
BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort);
|
||||
httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData);
|
||||
httpServer.Start();
|
||||
@@ -413,4 +409,4 @@ namespace OpenSim.Region.Environment.Modules
|
||||
return m_localID;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
public class AvatarAnimations
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>();
|
||||
public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>();
|
||||
|
||||
@@ -44,7 +46,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public void LoadAnims()
|
||||
{
|
||||
//MainLog.Instance.Verbose("CLIENT", "Loading avatar animations");
|
||||
//m_log.Info("[CLIENT]: Loading avatar animations");
|
||||
using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"))
|
||||
{
|
||||
XmlDocument doc = new XmlDocument();
|
||||
@@ -58,7 +60,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
// MainLog.Instance.Verbose("CLIENT", "Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
|
||||
// m_log.Info("[CLIENT]: Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
|
||||
|
||||
try
|
||||
{
|
||||
@@ -70,7 +72,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
MainLog.Instance.Warn("AVATAR", "Unable to load animation names for an Avatar");
|
||||
m_log.Warn("[AVATAR]: Unable to load animation names for an Avatar");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public class InnerScene
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
#region Events
|
||||
|
||||
public event PhysicsCrash UnRecoverableError;
|
||||
@@ -227,13 +229,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
if (child)
|
||||
{
|
||||
m_numChildAgents++;
|
||||
MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new child agent.");
|
||||
m_log.Info("[SCENE]: " + m_regInfo.RegionName + ": Creating new child agent.");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_numRootAgents++;
|
||||
MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new root agent.");
|
||||
MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Adding Physical agent.");
|
||||
m_log.Info("[SCENE]: " + m_regInfo.RegionName + ": Creating new root agent.");
|
||||
m_log.Info("[SCENE]: " + m_regInfo.RegionName + ": Adding Physical agent.");
|
||||
|
||||
newAvatar.AddToPhysicalScene();
|
||||
}
|
||||
@@ -542,7 +544,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
LLVector3 oLoc = ((SceneObjectGroup)ent).AbsolutePosition;
|
||||
float distResult = (float)Util.GetDistanceTo(presence.AbsolutePosition,oLoc);
|
||||
|
||||
//MainLog.Instance.Verbose("DISTANCE", distResult.ToString());
|
||||
//m_log.Info("[DISTANCE]: " + distResult.ToString());
|
||||
|
||||
if (distResult > 60)
|
||||
{
|
||||
@@ -897,9 +899,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Verbose("SCENE",
|
||||
m_log.Info(String.Format("[SCENE]: " +
|
||||
"DelinkObjects(): Could not find a root prim out of {0} as given to a delink request!",
|
||||
primIds);
|
||||
primIds));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -947,7 +949,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("SCENE", "Attempted to duplicate nonexistant prim id {0}", GroupID);
|
||||
m_log.Warn(String.Format("[SCENE]: Attempted to duplicate nonexistant prim id {0}", GroupID));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using libsecondlife;
|
||||
using libsecondlife.Packets;
|
||||
@@ -37,12 +38,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
public partial class Scene
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Start all the scripts in the scene which should be started.
|
||||
/// </summary>
|
||||
public void StartScripts()
|
||||
{
|
||||
MainLog.Instance.Verbose("PRIMINVENTORY", "Starting scripts in scene");
|
||||
m_log.Info("[PRIMINVENTORY]: Starting scripts in scene");
|
||||
|
||||
foreach (SceneObjectGroup group in Entities.Values)
|
||||
{
|
||||
@@ -80,8 +83,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
if (!TryGetAvatar(avatarId, out avatar))
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"AGENTINVENTORY", "Could not find avatar {0} to add inventory item", avatarId);
|
||||
m_log.Error(String.Format(
|
||||
"[AGENTINVENTORY]: Could not find avatar {0} to add inventory item", avatarId));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -143,10 +146,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"AGENTINVENTORY",
|
||||
"Avatar {0} cannot be found to update its inventory item asset",
|
||||
avatarId);
|
||||
m_log.Error(String.Format(
|
||||
"[AGENTINVENTORY]: " +
|
||||
"Avatar {0} cannot be found to update its inventory item asset",
|
||||
avatarId));
|
||||
}
|
||||
|
||||
return LLUUID.Zero;
|
||||
@@ -168,10 +171,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
SceneObjectGroup group = part.ParentGroup;
|
||||
if (null == group)
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Prim inventory update requested for item ID {0} in prim ID {1} but this prim does not exist",
|
||||
itemId, primId);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Prim inventory update requested for item ID {0} in prim ID {1} but this prim does not exist",
|
||||
itemId, primId));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -217,10 +220,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Avatar {0} cannot be found to update its prim item asset",
|
||||
avatarId);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Avatar {0} cannot be found to update its prim item asset",
|
||||
avatarId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,16 +292,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"AGENTINVENTORY",
|
||||
"Item ID " + itemID + " not found for an inventory item update.");
|
||||
m_log.Error(
|
||||
"[AGENTINVENTORY]: Item ID " + itemID + " not found for an inventory item update.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"AGENTINVENTORY",
|
||||
"Agent ID " + remoteClient.AgentId + " not found for an inventory item update.");
|
||||
m_log.Error(
|
||||
"[AGENTINVENTORY]: Agent ID " + remoteClient.AgentId + " not found for an inventory item update.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,7 +312,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(oldAgentID);
|
||||
if (userInfo == null)
|
||||
{
|
||||
MainLog.Instance.Error("AGENTINVENTORY", "Failed to find user " + oldAgentID.ToString());
|
||||
m_log.Error("[AGENTINVENTORY]: Failed to find user " + oldAgentID.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -320,13 +321,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
item = userInfo.RootFolder.HasItem(oldItemID);
|
||||
if (item == null)
|
||||
{
|
||||
MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + oldItemID.ToString());
|
||||
m_log.Error("[AGENTINVENTORY]: Failed to find item " + oldItemID.ToString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + oldItemID.ToString());
|
||||
m_log.Error("[AGENTINVENTORY]: Failed to find item " + oldItemID.ToString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -335,7 +336,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
AssetBase asset = AssetCache.CopyAsset(item.assetID);
|
||||
if (asset == null)
|
||||
{
|
||||
MainLog.Instance.Warn("AGENTINVENTORY", "Failed to find asset " + item.assetID.ToString());
|
||||
m_log.Warn("[AGENTINVENTORY]: Failed to find asset " + item.assetID.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -360,14 +361,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
public void MoveInventoryItem(IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length,
|
||||
string newName)
|
||||
{
|
||||
MainLog.Instance.Verbose(
|
||||
"AGENTINVENTORY",
|
||||
m_log.Info(
|
||||
"[AGENTINVENTORY]: " +
|
||||
"Moving item for " + remoteClient.AgentId.ToString());
|
||||
|
||||
CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
|
||||
if (userInfo == null)
|
||||
{
|
||||
MainLog.Instance.Error("AGENTINVENTORY", "Failed to find user " + remoteClient.AgentId.ToString());
|
||||
m_log.Error("[AGENTINVENTORY]: Failed to find user " + remoteClient.AgentId.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -388,13 +389,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + itemID.ToString());
|
||||
m_log.Error("[AGENTINVENTORY]: Failed to find item " + itemID.ToString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + itemID.ToString() + ", no root folder");
|
||||
m_log.Error("[AGENTINVENTORY]: Failed to find item " + itemID.ToString() + ", no root folder");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -497,8 +498,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY", "Inventory requested of prim {0} which doesn't exist", primLocalID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: Inventory requested of prim {0} which doesn't exist", primLocalID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -523,11 +524,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Removal of item {0} requested of prim {1} but this prim does not exist",
|
||||
itemID,
|
||||
localID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Removal of item {0} requested of prim {1} but this prim does not exist",
|
||||
itemID,
|
||||
localID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -547,18 +548,18 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
// TODO Retrieve itemID from client's inventory to pass on
|
||||
//group.AddInventoryItem(remoteClient, primLocalID, null);
|
||||
MainLog.Instance.Verbose(
|
||||
"PRIMINVENTORY",
|
||||
"Non script prim inventory not yet implemented!"
|
||||
+ "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}",
|
||||
itemID, folderID, primLocalID, remoteClient.Name);
|
||||
m_log.Info(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Non script prim inventory not yet implemented!"
|
||||
+ "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}",
|
||||
itemID, folderID, primLocalID, remoteClient.Name));
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn(
|
||||
"PRIMINVENTORY",
|
||||
"Update with item {0} requested of prim {1} for {2} but this prim does not exist",
|
||||
itemID, primLocalID, remoteClient.Name);
|
||||
m_log.Warn(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Update with item {0} requested of prim {1} for {2} but this prim does not exist",
|
||||
itemID, primLocalID, remoteClient.Name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -596,25 +597,25 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
group.StartScript(localID, copyID);
|
||||
group.GetProperites(remoteClient);
|
||||
|
||||
// MainLog.Instance.Verbose(
|
||||
// "PRIMINVENTORY",
|
||||
// "Rezzed script {0} into prim local ID {1} for user {2}",
|
||||
// item.inventoryName, localID, remoteClient.Name);
|
||||
// m_log.Info(
|
||||
// String.Format("[PRIMINVENTORY]: " +
|
||||
// "Rezzed script {0} into prim local ID {1} for user {2}",
|
||||
// item.inventoryName, localID, remoteClient.Name));
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Could not rez script {0} into prim local ID {1} for user {2}"
|
||||
+ " because the prim could not be found in the region!",
|
||||
item.inventoryName, localID, remoteClient.Name);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Could not rez script {0} into prim local ID {1} for user {2}"
|
||||
+ " because the prim could not be found in the region!",
|
||||
item.inventoryName, localID, remoteClient.Name));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY", "Could not find script inventory item {0} to rez for {1}!",
|
||||
itemID, remoteClient.Name);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: Could not find script inventory item {0} to rez for {1}!",
|
||||
itemID, remoteClient.Name));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -646,7 +647,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData)
|
||||
{
|
||||
EntityBase selectedEnt = null;
|
||||
//MainLog.Instance.Verbose("CLIENT", "LocalID:" + Data.ObjectLocalID.ToString());
|
||||
//m_log.Info("[CLIENT]: LocalID:" + Data.ObjectLocalID.ToString());
|
||||
|
||||
List<EntityBase> EntitieList = GetEntities();
|
||||
|
||||
|
||||
@@ -270,12 +270,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
RegisterDefaultSceneEvents();
|
||||
|
||||
MainLog.Instance.Verbose("SCENE", "Creating new entitities instance");
|
||||
m_log.Info("[SCENE]: Creating new entitities instance");
|
||||
Entities = new Dictionary<LLUUID, EntityBase>();
|
||||
m_scenePresences = new Dictionary<LLUUID, ScenePresence>();
|
||||
//m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>();
|
||||
|
||||
MainLog.Instance.Verbose("SCENE", "Creating LandMap");
|
||||
m_log.Info("[SCENE]: Creating LandMap");
|
||||
Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY);
|
||||
|
||||
ScenePresence.LoadAnims();
|
||||
@@ -365,16 +365,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
// This means that we're not booted up completely yet.
|
||||
// This shouldn't happen too often anymore.
|
||||
MainLog.Instance.Error("SCENE",
|
||||
"Couldn't inform client of regionup because we got a null reference exception");
|
||||
m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Verbose("INTERGRID",
|
||||
"Got notice about far away Region: " + otherRegion.RegionName.ToString() +
|
||||
" at (" + otherRegion.RegionLocX.ToString() + ", " +
|
||||
otherRegion.RegionLocY.ToString() + ")");
|
||||
m_log.Info("[INTERGRID]: Got notice about far away Region: " + otherRegion.RegionName.ToString() +
|
||||
" at (" + otherRegion.RegionLocX.ToString() + ", " +
|
||||
otherRegion.RegionLocY.ToString() + ")");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -402,7 +400,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
m_RestartTimerCounter = 0;
|
||||
m_restartTimer.AutoReset = true;
|
||||
m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
|
||||
MainLog.Instance.Error("REGION", "Restarting Region in " + (seconds/60) + " minutes");
|
||||
m_log.Error("[REGION]: Restarting Region in " + (seconds/60) + " minutes");
|
||||
m_restartTimer.Start();
|
||||
SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes");
|
||||
//SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes");
|
||||
@@ -436,9 +434,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
// This causes the region to restart immediatley.
|
||||
public void RestartNow()
|
||||
{
|
||||
MainLog.Instance.Error("REGION", "Closing");
|
||||
m_log.Error("[REGION]: Closing");
|
||||
Close();
|
||||
MainLog.Instance.Error("REGION", "Firing Region Restart Message");
|
||||
m_log.Error("[REGION]: Firing Region Restart Message");
|
||||
base.Restart(0);
|
||||
}
|
||||
|
||||
@@ -485,7 +483,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
if (m_scripts_enabled != !ScriptEngine)
|
||||
{
|
||||
// Tedd! Here's the method to disable the scripting engine!
|
||||
MainLog.Instance.Verbose("TOTEDD", "Here is the method to trigger disabling of the scripting engine");
|
||||
m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine");
|
||||
}
|
||||
if (m_physics_enabled != !PhysicsEngine)
|
||||
{
|
||||
@@ -498,7 +496,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
// This is the method that shuts down the scene.
|
||||
public override void Close()
|
||||
{
|
||||
MainLog.Instance.Warn("SCENE", "Closing down the single simulator: " + RegionInfo.RegionName);
|
||||
m_log.Warn("[SCENE]: Closing down the single simulator: " + RegionInfo.RegionName);
|
||||
// Kick all ROOT agents with the message, 'The simulator is going down'
|
||||
ForEachScenePresence(delegate(ScenePresence avatar)
|
||||
{
|
||||
@@ -543,7 +541,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// </summary>
|
||||
public void StartTimer()
|
||||
{
|
||||
MainLog.Instance.Debug("SCENE", "Starting timer");
|
||||
m_log.Debug("[SCENE]: Starting timer");
|
||||
m_heartbeatTimer.Enabled = true;
|
||||
m_heartbeatTimer.Interval = (int) (m_timespan*1000);
|
||||
m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat);
|
||||
@@ -649,7 +647,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("Scene", "Failed with exception " + e.ToString());
|
||||
m_log.Error("[Scene]: Failed with exception " + e.ToString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -848,7 +846,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile))
|
||||
{
|
||||
MainLog.Instance.Verbose("TERRAIN", "No default terrain. Generating a new terrain.");
|
||||
m_log.Info("[TERRAIN]: No default terrain. Generating a new terrain.");
|
||||
Terrain.SetDefaultTerrain();
|
||||
|
||||
m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID);
|
||||
@@ -862,8 +860,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
catch
|
||||
{
|
||||
MainLog.Instance.Verbose("TERRAIN",
|
||||
"No terrain found in database or default. Generating a new terrain.");
|
||||
m_log.Info("[TERRAIN]: No terrain found in database or default. Generating a new terrain.");
|
||||
Terrain.SetDefaultTerrain();
|
||||
}
|
||||
m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID);
|
||||
@@ -879,7 +876,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Warn("terrain", "Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString());
|
||||
m_log.Warn("[terrain]: Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -894,12 +891,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
if (dGridSettings["allow_forceful_banlines"] != "TRUE")
|
||||
{
|
||||
MainLog.Instance.Verbose("GRID", "Grid is disabling forceful parcel banlists");
|
||||
m_log.Info("[GRID]: Grid is disabling forceful parcel banlists");
|
||||
m_LandManager.allowedForcefulBans = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Verbose("GRID", "Grid is allowing forceful parcel banlists");
|
||||
m_log.Info("[GRID]: Grid is allowing forceful parcel banlists");
|
||||
m_LandManager.allowedForcefulBans = true;
|
||||
}
|
||||
}
|
||||
@@ -929,7 +926,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public void loadAllLandObjectsFromStorage()
|
||||
{
|
||||
MainLog.Instance.Verbose("SCENE", "Loading land objects from storage");
|
||||
m_log.Info("[SCENE]: Loading land objects from storage");
|
||||
List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(RegionInfo.RegionID);
|
||||
|
||||
if (landData.Count == 0)
|
||||
@@ -951,7 +948,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// </summary>
|
||||
public virtual void LoadPrimsFromStorage(bool m_permissions)
|
||||
{
|
||||
MainLog.Instance.Verbose("SCENE", "Loading objects from datastore");
|
||||
m_log.Info("[SCENE]: Loading objects from datastore");
|
||||
|
||||
List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID);
|
||||
foreach (SceneObjectGroup group in PrimsFromDB)
|
||||
@@ -964,7 +961,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
//rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
|
||||
}
|
||||
|
||||
MainLog.Instance.Verbose("SCENE", "Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
|
||||
m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
|
||||
}
|
||||
|
||||
|
||||
@@ -999,7 +996,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
pos = target.AbsolutePosition;
|
||||
|
||||
//MainLog.Instance.Verbose("RAYTRACE", pos.ToString());
|
||||
//m_log.Info("[RAYTRACE]: " + pos.ToString());
|
||||
//EntityIntersection rayTracing = null;
|
||||
//ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID));
|
||||
//if (presence != null)
|
||||
@@ -1038,14 +1035,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
//Vector3 RezPoint = Newpos;
|
||||
|
||||
//MainLog.Instance.Verbose("REZINFO", "Possible Rez Point:" + RezPoint.ToString());
|
||||
//m_log.Info("[REZINFO]: Possible Rez Point:" + RezPoint.ToString());
|
||||
//pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return pos;
|
||||
}
|
||||
else
|
||||
@@ -1061,18 +1054,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
pos = RayEnd;
|
||||
return pos;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public virtual void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape,
|
||||
byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID,
|
||||
byte RayEndIsIntersection)
|
||||
byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID,
|
||||
byte RayEndIsIntersection)
|
||||
{
|
||||
LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection);
|
||||
|
||||
|
||||
|
||||
|
||||
if (PermissionsMngr.CanRezObject(ownerID, pos))
|
||||
{
|
||||
// rez ON the ground, not IN the ground
|
||||
@@ -1364,7 +1353,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("Scene.cs:RemoveClient exception: " + e.ToString());
|
||||
m_log.Error("Scene.cs:RemoveClient exception: " + e.ToString());
|
||||
}
|
||||
|
||||
// Remove client agent from profile, so new logins will work
|
||||
@@ -1474,7 +1463,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
if (m_capsHandlers.ContainsKey(agent.AgentID))
|
||||
{
|
||||
//MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " +
|
||||
//m_log.Warn("[client]: Adding duplicate CAPS entry for user " +
|
||||
// agent.AgentID.ToString());
|
||||
try
|
||||
{
|
||||
@@ -1514,8 +1503,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("SCENE", "Unable to do Agent Crossing.");
|
||||
MainLog.Instance.Debug("SCENE", e.ToString());
|
||||
m_log.Info("[SCENE]: Unable to do Agent Crossing.");
|
||||
m_log.Debug("[SCENE]: " + e.ToString());
|
||||
}
|
||||
//m_innerScene.SwapRootChildAgent(false);
|
||||
}
|
||||
@@ -2158,14 +2147,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
switch (showWhat)
|
||||
{
|
||||
case "users":
|
||||
MainLog.Instance.Error("Current Region: " + RegionInfo.RegionName);
|
||||
MainLog.Instance.Error(
|
||||
m_log.Error("Current Region: " + RegionInfo.RegionName);
|
||||
m_log.Error(
|
||||
String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname",
|
||||
"Agent ID", "Session ID", "Circuit", "IP", "World"));
|
||||
|
||||
foreach (ScenePresence scenePrescence in GetAvatars())
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
m_log.Error(
|
||||
String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}",
|
||||
scenePrescence.Firstname,
|
||||
scenePrescence.Lastname,
|
||||
@@ -2177,12 +2166,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
break;
|
||||
case "modules":
|
||||
MainLog.Instance.Error("The currently loaded modules in " + RegionInfo.RegionName + " are:");
|
||||
m_log.Error("The currently loaded modules in " + RegionInfo.RegionName + " are:");
|
||||
foreach (IRegionModule module in Modules.Values)
|
||||
{
|
||||
if (!module.IsSharedModule)
|
||||
{
|
||||
MainLog.Instance.Error("Region Module: " + module.Name);
|
||||
m_log.Error("Region Module: " + module.Name);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2250,11 +2239,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="scriptEngine"></param>
|
||||
/// <param name="logger"></param>
|
||||
public void AddScriptEngine(ScriptEngineInterface scriptEngine, LogBase logger)
|
||||
public void AddScriptEngine(ScriptEngineInterface scriptEngine)
|
||||
{
|
||||
ScriptEngines.Add(scriptEngine);
|
||||
scriptEngine.InitializeEngine(this, logger);
|
||||
scriptEngine.InitializeEngine(this);
|
||||
}
|
||||
|
||||
public void TriggerObjectChanged(uint localID, uint change)
|
||||
@@ -2372,7 +2360,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Verbose("BUG", e.ToString());
|
||||
m_log.Info("[BUG]: " + e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
public abstract class SceneBase : IScene
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
#region Events
|
||||
|
||||
public event restart OnRestart;
|
||||
@@ -155,7 +157,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// <param name="seconds"></param>
|
||||
public virtual void Restart(int seconds)
|
||||
{
|
||||
MainLog.Instance.Error("REGION", "passing Restart Message up the namespace");
|
||||
m_log.Error("[REGION]: passing Restart Message up the namespace");
|
||||
OnRestart(RegionInfo);
|
||||
}
|
||||
|
||||
@@ -180,7 +182,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainLog.Instance.Error("SCENE", "SceneBase.cs: Close() - Failed with exception " + e.ToString());
|
||||
m_log.Error("[SCENE]: SceneBase.cs: Close() - Failed with exception " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public class SceneCommunicationService //one instance per region
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected CommunicationsManager m_commsProvider;
|
||||
protected RegionInfo m_regionInfo;
|
||||
|
||||
@@ -77,7 +79,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
if (regionCommsHost != null)
|
||||
{
|
||||
//MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: registered with gridservice and got" + regionCommsHost.ToString());
|
||||
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: registered with gridservice and got" + regionCommsHost.ToString());
|
||||
|
||||
regionCommsHost.debugRegionName = _debugRegionName;
|
||||
|
||||
@@ -91,7 +93,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
//MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: registered with gridservice and got null");
|
||||
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: registered with gridservice and got null");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +124,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
if (OnExpectUser != null)
|
||||
{
|
||||
//MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: OnExpectUser Fired for User:" + agent.firstname + " " + agent.lastname);
|
||||
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: OnExpectUser Fired for User:" + agent.firstname + " " + agent.lastname);
|
||||
OnExpectUser(regionHandle, agent);
|
||||
}
|
||||
}
|
||||
@@ -131,7 +133,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
if (OnRegionUp != null)
|
||||
{
|
||||
//MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: newRegionUp Fired for User:" + region.RegionName);
|
||||
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: newRegionUp Fired for User:" + region.RegionName);
|
||||
OnRegionUp(region);
|
||||
}
|
||||
return true;
|
||||
@@ -164,7 +166,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
protected bool CloseConnection(ulong regionHandle, LLUUID agentID)
|
||||
{
|
||||
MainLog.Instance.Verbose("INTERREGION", "Incoming Agent Close Request for agent: " + agentID.ToString());
|
||||
m_log.Info("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID.ToString());
|
||||
|
||||
if (OnCloseAgentConnection != null)
|
||||
{
|
||||
@@ -199,14 +201,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
private void InformClientOfNeighbourAsync(ScenePresence avatar, AgentCircuitData a, ulong regionHandle,
|
||||
IPEndPoint endPoint)
|
||||
{
|
||||
MainLog.Instance.Notice("INTERGRID", "Starting to inform client about neighbours");
|
||||
m_log.Info("[INTERGRID]: Starting to inform client about neighbours");
|
||||
bool regionAccepted = m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, a);
|
||||
|
||||
if (regionAccepted)
|
||||
{
|
||||
avatar.ControllingClient.InformClientOfNeighbour(regionHandle, endPoint);
|
||||
avatar.AddNeighbourRegion(regionHandle);
|
||||
MainLog.Instance.Notice("INTERGRID", "Completed inform client about neighbours");
|
||||
m_log.Info("[INTERGRID]: Completed inform client about neighbours");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,17 +293,17 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
private void InformNeighboursThatRegionIsUpAsync(RegionInfo region, ulong regionhandle)
|
||||
{
|
||||
MainLog.Instance.Notice("INTERGRID", "Starting to inform neighbors that I'm here");
|
||||
m_log.Info("[INTERGRID]: Starting to inform neighbors that I'm here");
|
||||
bool regionAccepted =
|
||||
m_commsProvider.InterRegion.RegionUp((new SearializableRegionInfo(region)), regionhandle);
|
||||
|
||||
if (regionAccepted)
|
||||
{
|
||||
MainLog.Instance.Notice("INTERGRID", "Completed informing neighbors that I'm here");
|
||||
m_log.Info("[INTERGRID]: Completed informing neighbors that I'm here");
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Notice("INTERGRID", "Failed to inform neighbors that I'm here");
|
||||
m_log.Info("[INTERGRID]: Failed to inform neighbors that I'm here");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,7 +313,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// </summary>
|
||||
public void InformNeighborsThatRegionisUp(RegionInfo region)
|
||||
{
|
||||
//MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName);
|
||||
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName);
|
||||
|
||||
|
||||
List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>();
|
||||
@@ -343,7 +345,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// </summary>
|
||||
private void SendChildAgentDataUpdateAsync(ChildAgentDataUpdate cAgentData, ScenePresence presence)
|
||||
{
|
||||
//MainLog.Instance.Notice("INTERGRID", "Informing neighbors about my agent.");
|
||||
//m_log.Info("[INTERGRID]: Informing neighbors about my agent.");
|
||||
try
|
||||
{
|
||||
foreach (ulong regionHandle in presence.KnownChildRegions)
|
||||
@@ -352,11 +354,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
if (regionAccepted)
|
||||
{
|
||||
//MainLog.Instance.Notice("INTERGRID", "Completed sending a neighbor an update about my agent");
|
||||
//m_log.Info("[INTERGRID]: Completed sending a neighbor an update about my agent");
|
||||
}
|
||||
else
|
||||
{
|
||||
//MainLog.Instance.Notice("INTERGRID", "Failed sending a neighbor an update about my agent");
|
||||
//m_log.Info("[INTERGRID]: Failed sending a neighbor an update about my agent");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -397,12 +399,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
if (regionAccepted)
|
||||
{
|
||||
MainLog.Instance.Notice("INTERGRID", "Completed sending agent Close agent Request to neighbor");
|
||||
m_log.Info("[INTERGRID]: Completed sending agent Close agent Request to neighbor");
|
||||
presence.RemoveNeighbourRegion(regionHandle);
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Notice("INTERGRID", "Failed sending agent Close agent Request to neighbor");
|
||||
m_log.Info("[INTERGRID]: Failed sending agent Close agent Request to neighbor");
|
||||
|
||||
}
|
||||
|
||||
@@ -431,7 +433,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// <returns></returns>
|
||||
public virtual RegionInfo RequestNeighbouringRegionInfo(ulong regionHandle)
|
||||
{
|
||||
//MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionHandle.ToString());
|
||||
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionHandle.ToString());
|
||||
return m_commsProvider.GridService.RequestNeighbourInfo(regionHandle);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public class SceneManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public event RestartSim OnRestartSim;
|
||||
|
||||
private readonly List<Scene> m_localScenes;
|
||||
@@ -98,8 +100,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public void HandleRestart(RegionInfo rdata)
|
||||
{
|
||||
MainLog.Instance.Error("SCENEMANAGER",
|
||||
"Got Restart message for region:" + rdata.RegionName + " Sending up to main");
|
||||
m_log.Error("[SCENEMANAGER]: Got Restart message for region:" + rdata.RegionName + " Sending up to main");
|
||||
int RegionSceneElement = -1;
|
||||
for (int i = 0; i < m_localScenes.Count; i++)
|
||||
{
|
||||
@@ -146,7 +147,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error("REGION", "Unable to notify Other regions of this Region coming up");
|
||||
m_log.Error("[REGION]: Unable to notify Other regions of this Region coming up");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,29 +286,29 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
return false;
|
||||
}
|
||||
|
||||
public void SetDebugPacketOnCurrentScene(LogBase log, int newDebug)
|
||||
public void SetDebugPacketOnCurrentScene(int newDebug)
|
||||
{
|
||||
ForEachCurrentScene(delegate(Scene scene)
|
||||
{
|
||||
List<EntityBase> EntitieList = scene.GetEntities();
|
||||
|
||||
foreach (EntityBase entity in EntitieList)
|
||||
{
|
||||
List<EntityBase> EntitieList = scene.GetEntities();
|
||||
|
||||
foreach (EntityBase entity in EntitieList)
|
||||
if (entity is ScenePresence)
|
||||
{
|
||||
if (entity is ScenePresence)
|
||||
ScenePresence scenePrescence = entity as ScenePresence;
|
||||
if (!scenePrescence.IsChildAgent)
|
||||
{
|
||||
ScenePresence scenePrescence = entity as ScenePresence;
|
||||
if (!scenePrescence.IsChildAgent)
|
||||
{
|
||||
log.Error(String.Format("Packet debug for {0} {1} set to {2}",
|
||||
scenePrescence.Firstname,
|
||||
scenePrescence.Lastname,
|
||||
newDebug));
|
||||
m_log.Error(String.Format("Packet debug for {0} {1} set to {2}",
|
||||
scenePrescence.Firstname,
|
||||
scenePrescence.Lastname,
|
||||
newDebug));
|
||||
|
||||
scenePrescence.ControllingClient.SetDebug(newDebug);
|
||||
}
|
||||
scenePrescence.ControllingClient.SetDebug(newDebug);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public List<ScenePresence> GetCurrentSceneAvatars()
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
public partial class SceneObjectGroup : EntityBase
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Start a given script.
|
||||
/// </summary>
|
||||
@@ -53,10 +55,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Couldn't find part {0} in object group {1}, {2} to start script with ID {3}",
|
||||
localID, Name, UUID, itemID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Couldn't find part {0} in object group {1}, {2} to start script with ID {3}",
|
||||
localID, Name, UUID, itemID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,10 +76,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// MainLog.Instance.Error(
|
||||
// "PRIMINVENTORY",
|
||||
// "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}",
|
||||
// localID, Name, UUID, itemID);
|
||||
// m_log.Error(String.Format(
|
||||
// "[PRIMINVENTORY]: " +
|
||||
// "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}",
|
||||
// localID, Name, UUID, itemID));
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -106,10 +108,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}",
|
||||
partID, Name, UUID, itemID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}",
|
||||
partID, Name, UUID, itemID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,10 +129,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Couldn't find part {0} in object group {1}, {2} to retreive prim inventory",
|
||||
localID, Name, UUID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Couldn't find part {0} in object group {1}, {2} to retreive prim inventory",
|
||||
localID, Name, UUID));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -144,10 +146,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Couldn't find part {0} in object group {1}, {2} to request inventory data",
|
||||
localID, Name, UUID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Couldn't find part {0} in object group {1}, {2} to request inventory data",
|
||||
localID, Name, UUID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,10 +185,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Couldn't find prim local ID {0} in group {1}, {2} to add inventory item ID {3}",
|
||||
localID, Name, UUID, newItemId);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Couldn't find prim local ID {0} in group {1}, {2} to add inventory item ID {3}",
|
||||
localID, Name, UUID, newItemId));
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -207,10 +209,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}",
|
||||
primID, part.Name, part.UUID, itemID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}",
|
||||
primID, part.Name, part.UUID, itemID));
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -233,10 +235,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Couldn't find prim ID {0} to update item {1}, {2}",
|
||||
item.ParentPartID, item.Name, item.ItemID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Couldn't find prim ID {0} to update item {1}, {2}",
|
||||
item.ParentPartID, item.Name, item.ItemID));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -1003,9 +1003,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Verbose("SCENE",
|
||||
m_log.Info(String.Format("[SCENE]: " +
|
||||
"DelinkFromGroup(): Child prim local id {0} not found in object with root prim id {1}",
|
||||
partID, LocalId);
|
||||
partID, LocalId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
public partial class SceneObjectPart : IScriptHost
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string m_inventoryFileName = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
@@ -131,10 +133,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// <returns></returns>
|
||||
public void StartScript(TaskInventoryItem item)
|
||||
{
|
||||
// MainLog.Instance.Verbose(
|
||||
// "PRIMINVENTORY",
|
||||
// "Starting script {0}, {1} in prim {2}, {3}",
|
||||
// item.Name, item.ItemID, Name, UUID);
|
||||
// m_log.Info(String.Format(
|
||||
// "[PRIMINVENTORY]: " +
|
||||
// "Starting script {0}, {1} in prim {2}, {3}",
|
||||
// item.Name, item.ItemID, Name, UUID));
|
||||
|
||||
AssetBase rezAsset = m_parentGroup.Scene.AssetCache.GetAsset(item.AssetID, false);
|
||||
|
||||
@@ -145,10 +147,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Couldn't start script {0}, {1} since asset ID {2} could not be found",
|
||||
item.Name, item.ItemID, item.AssetID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Couldn't start script {0}, {1} since asset ID {2} could not be found",
|
||||
item.Name, item.ItemID, item.AssetID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,10 +170,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2}",
|
||||
itemId, Name, UUID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2}",
|
||||
itemId, Name, UUID));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -188,10 +190,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}",
|
||||
itemId, Name, UUID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}",
|
||||
itemId, Name, UUID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,10 +253,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory",
|
||||
itemID, Name, UUID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory",
|
||||
itemID, Name, UUID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,10 +285,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory",
|
||||
item.ItemID, Name, UUID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory",
|
||||
item.ItemID, Name, UUID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,10 +318,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Error(
|
||||
"PRIMINVENTORY",
|
||||
"Tried to remove item ID {0} from prim {1}, {2} but the item does not exist in this inventory",
|
||||
itemID, Name, UUID);
|
||||
m_log.Error(String.Format(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Tried to remove item ID {0} from prim {1}, {2} but the item does not exist in this inventory",
|
||||
itemID, Name, UUID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -384,8 +386,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
fileData = Helpers.StringToField(invString.BuildString);
|
||||
|
||||
// MainLog.Instance.Verbose(
|
||||
// "PRIMINVENTORY", "RequestInventoryFile fileData: {0}", Helpers.FieldToUTF8String(fileData));
|
||||
// m_log.Info(String.Format(
|
||||
// "[PRIMINVENTORY]: RequestInventoryFile fileData: {0}", Helpers.FieldToUTF8String(fileData)));
|
||||
|
||||
if (fileData.Length > 2)
|
||||
{
|
||||
|
||||
@@ -306,7 +306,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
// Ignore, and skip over.
|
||||
}
|
||||
//MainLog.Instance.Verbose("PART", "OFFSET:" + m_offsetPosition, ToString());
|
||||
//m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,14 +347,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
if (ParentID == 0)
|
||||
{
|
||||
PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z);
|
||||
//MainLog.Instance.Verbose("PART", "RO1:" + PhysActor.Orientation.ToString());
|
||||
//m_log.Info("[PART]: RO1:" + PhysActor.Orientation.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Child prim we have to calculate it's world rotationwel
|
||||
LLQuaternion resultingrotation = GetWorldRotation();
|
||||
PhysActor.Orientation = new Quaternion(resultingrotation.W, resultingrotation.X, resultingrotation.Y, resultingrotation.Z);
|
||||
//MainLog.Instance.Verbose("PART", "RO2:" + PhysActor.Orientation.ToString());
|
||||
//m_log.Info("[PART]: RO2:" + PhysActor.Orientation.ToString());
|
||||
}
|
||||
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
|
||||
//}
|
||||
@@ -1554,14 +1554,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
// Are we the owner?
|
||||
if (AgentID == OwnerID)
|
||||
{
|
||||
MainLog.Instance.Verbose("PERMISSIONS",
|
||||
"field: " + field.ToString() + ", mask: " + mask.ToString() + " addRemTF: " +
|
||||
addRemTF.ToString());
|
||||
m_log.Info("[PERMISSIONS]: field: " + field.ToString() + ", mask: " + mask.ToString() + " addRemTF: " +
|
||||
addRemTF.ToString());
|
||||
|
||||
//Field 8 = EveryoneMask
|
||||
if (field == (byte) 8)
|
||||
{
|
||||
MainLog.Instance.Verbose("PERMISSIONS", "Left over: " + (OwnerMask - EveryoneMask));
|
||||
m_log.Info("[PERMISSIONS]: Left over: " + (OwnerMask - EveryoneMask));
|
||||
if (addRemTF == (byte) 0)
|
||||
{
|
||||
//EveryoneMask = (uint)0;
|
||||
@@ -1751,7 +1750,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public void PhysicsOutOfBounds(PhysicsVector pos)
|
||||
{
|
||||
MainLog.Instance.Verbose("PHYSICS", "Physical Object went out of bounds.");
|
||||
m_log.Info("[PHYSICS]: Physical Object went out of bounds.");
|
||||
RemFlag(LLObject.ObjectFlags.Physics);
|
||||
DoPhysicsPropertyUpdate(false, true);
|
||||
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
|
||||
|
||||
@@ -39,6 +39,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
public class ScenePresence : EntityBase
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public static AvatarAnimations Animations;
|
||||
public static byte[] DefaultTexture;
|
||||
public LLUUID currentParcelUUID = LLUUID.Zero;
|
||||
@@ -345,7 +347,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
catch (KeyNotFoundException)
|
||||
{
|
||||
MainLog.Instance.Warn("AVATAR", "KeyNotFound Exception playing avatar stand animation");
|
||||
m_log.Warn("[AVATAR]: KeyNotFound Exception playing avatar stand animation");
|
||||
}
|
||||
m_animationSeqs.Add(1);
|
||||
|
||||
@@ -933,7 +935,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
MainLog.Instance.Warn("Sit requested on unknown object: " + targetID.ToString());
|
||||
m_log.Warn("Sit requested on unknown object: " + targetID.ToString());
|
||||
}
|
||||
SendSitResponse(remoteClient, targetID, offset);
|
||||
}
|
||||
@@ -1047,7 +1049,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
catch
|
||||
{
|
||||
MainLog.Instance.Warn("AVATAR", "SetMovementAnimation for avatar failed. Attempting recovery...");
|
||||
m_log.Warn("[AVATAR]: SetMovementAnimation for avatar failed. Attempting recovery...");
|
||||
m_animations[0] = anim;
|
||||
m_animationSeqs[0] = seq;
|
||||
SendAnimPack();
|
||||
@@ -1184,13 +1186,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
//bool controlland = (((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0));
|
||||
//bool colliding = (m_physicsActor.IsColliding==true);
|
||||
//if (controlland)
|
||||
// MainLog.Instance.Verbose("AGENT","landCommand");
|
||||
// m_log.Info("[AGENT]: landCommand");
|
||||
//if (colliding )
|
||||
// MainLog.Instance.Verbose("AGENT","colliding");
|
||||
// m_log.Info("[AGENT]: colliding");
|
||||
//if (m_physicsActor.Flying && colliding && controlland)
|
||||
//{
|
||||
// StopFlying();
|
||||
// MainLog.Instance.Verbose("AGENT", "Stop FLying");
|
||||
// m_log.Info("[AGENT]: Stop FLying");
|
||||
//}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
|
||||
{
|
||||
public interface ScriptEngineInterface
|
||||
{
|
||||
void InitializeEngine(Scene Sceneworld, LogBase logger);
|
||||
void InitializeEngine(Scene Sceneworld);
|
||||
void Shutdown();
|
||||
// void StartScript(string ScriptID, IScriptHost ObjectID);
|
||||
}
|
||||
|
||||
@@ -35,12 +35,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
|
||||
{
|
||||
public class ScriptEngineLoader
|
||||
{
|
||||
private LogBase m_log;
|
||||
|
||||
public ScriptEngineLoader(LogBase logger)
|
||||
{
|
||||
m_log = logger;
|
||||
}
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public ScriptEngineInterface LoadScriptEngine(string EngineName)
|
||||
{
|
||||
@@ -54,7 +49,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("ScriptEngine",
|
||||
m_log.Error("[ScriptEngine]: " +
|
||||
"Error loading assembly \"" + EngineName + "\": " + e.Message + ", " +
|
||||
e.StackTrace.ToString());
|
||||
}
|
||||
@@ -88,7 +83,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
|
||||
//}
|
||||
//catch (Exception e)
|
||||
//{
|
||||
// m_log.Error("ScriptEngine", "Error loading assembly \String.Empty + FileName + "\": " + e.ToString());
|
||||
// m_log.Error("[ScriptEngine]: Error loading assembly \String.Empty + FileName + "\": " + e.ToString());
|
||||
//}
|
||||
|
||||
|
||||
@@ -105,7 +100,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
|
||||
//}
|
||||
//catch (Exception e)
|
||||
//{
|
||||
// m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
|
||||
// m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
|
||||
//}
|
||||
|
||||
ScriptEngineInterface ret;
|
||||
@@ -115,7 +110,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
|
||||
//}
|
||||
//catch (Exception e)
|
||||
//{
|
||||
// m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
|
||||
// m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
|
||||
//}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.Environment
|
||||
{
|
||||
public class StorageManager
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IRegionDataStore m_dataStore;
|
||||
|
||||
public IRegionDataStore DataStore
|
||||
@@ -49,7 +51,7 @@ namespace OpenSim.Region.Environment
|
||||
|
||||
public StorageManager(string dllName, string connectionstring, bool persistPrimInventories)
|
||||
{
|
||||
MainLog.Instance.Verbose("DATASTORE", "Attempting to load " + dllName);
|
||||
m_log.Info("[DATASTORE]: Attempting to load " + dllName);
|
||||
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
||||
|
||||
foreach (Type pluginType in pluginAssembly.GetTypes())
|
||||
@@ -66,7 +68,7 @@ namespace OpenSim.Region.Environment
|
||||
|
||||
m_dataStore = plug;
|
||||
|
||||
MainLog.Instance.Verbose("DATASTORE", "Added IRegionDataStore Interface");
|
||||
m_log.Info("[DATASTORE]: Added IRegionDataStore Interface");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user