diff options
Diffstat (limited to '')
25 files changed, 353 insertions, 382 deletions
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs index edc86e5..860bd93 100644 --- a/OpenSim/Region/Environment/EstateManager.cs +++ b/OpenSim/Region/Environment/EstateManager.cs | |||
@@ -41,6 +41,8 @@ namespace OpenSim.Region.Environment | |||
41 | /// </summary> | 41 | /// </summary> |
42 | public class EstateManager | 42 | public class EstateManager |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
44 | private Scene m_scene; | 46 | private Scene m_scene; |
45 | private RegionInfo m_regInfo; | 47 | private RegionInfo m_regInfo; |
46 | 48 | ||
@@ -156,7 +158,7 @@ namespace OpenSim.Region.Environment | |||
156 | { | 158 | { |
157 | case "getinfo": | 159 | case "getinfo": |
158 | 160 | ||
159 | //MainLog.Instance.Verbose("ESTATE","CLIENT--->" + packet.ToString()); | 161 | //m_log.Info("[ESTATE]: CLIENT--->" + packet.ToString()); |
160 | sendRegionInfoPacketToAll(); | 162 | sendRegionInfoPacketToAll(); |
161 | if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) | 163 | if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) |
162 | { | 164 | { |
@@ -223,7 +225,7 @@ namespace OpenSim.Region.Environment | |||
223 | } | 225 | } |
224 | break; | 226 | break; |
225 | default: | 227 | default: |
226 | MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); | 228 | m_log.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); |
227 | break; | 229 | break; |
228 | } | 230 | } |
229 | } | 231 | } |
@@ -283,7 +285,7 @@ namespace OpenSim.Region.Environment | |||
283 | returnblock[8].Parameter = Helpers.StringToField("1"); | 285 | returnblock[8].Parameter = Helpers.StringToField("1"); |
284 | 286 | ||
285 | packet.ParamList = returnblock; | 287 | packet.ParamList = returnblock; |
286 | //MainLog.Instance.Verbose("ESTATE", "SIM--->" + packet.ToString()); | 288 | //m_log.Info("[ESTATE]: SIM--->" + packet.ToString()); |
287 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); | 289 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); |
288 | 290 | ||
289 | sendEstateManagerList(remote_client, packet); | 291 | sendEstateManagerList(remote_client, packet); |
@@ -322,7 +324,7 @@ namespace OpenSim.Region.Environment | |||
322 | returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; | 324 | returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; |
323 | } | 325 | } |
324 | packet.ParamList = returnblock; | 326 | packet.ParamList = returnblock; |
325 | //MainLog.Instance.Verbose("ESTATE", "SIM--->" + packet.ToString()); | 327 | //m_log.Info("[ESTATE]: SIM--->" + packet.ToString()); |
326 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); | 328 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); |
327 | } | 329 | } |
328 | 330 | ||
@@ -364,10 +366,10 @@ namespace OpenSim.Region.Environment | |||
364 | 366 | ||
365 | default: | 367 | default: |
366 | 368 | ||
367 | MainLog.Instance.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta\n" + packet.ToString()); | 369 | m_log.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta\n" + packet.ToString()); |
368 | break; | 370 | break; |
369 | } | 371 | } |
370 | //MainLog.Instance.Error("EstateOwnerMessage: estateAccessDelta\n" + packet.ToString()); | 372 | //m_log.Error("EstateOwnerMessage: estateAccessDelta\n" + packet.ToString()); |
371 | 373 | ||
372 | 374 | ||
373 | } | 375 | } |
@@ -375,7 +377,7 @@ namespace OpenSim.Region.Environment | |||
375 | { | 377 | { |
376 | if (packet.ParamList.Length != 9) | 378 | if (packet.ParamList.Length != 9) |
377 | { | 379 | { |
378 | MainLog.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length"); | 380 | m_log.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length"); |
379 | } | 381 | } |
380 | else | 382 | else |
381 | { | 383 | { |
@@ -438,7 +440,7 @@ namespace OpenSim.Region.Environment | |||
438 | { | 440 | { |
439 | if (packet.ParamList.Length != 9) | 441 | if (packet.ParamList.Length != 9) |
440 | { | 442 | { |
441 | MainLog.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length"); | 443 | m_log.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length"); |
442 | } | 444 | } |
443 | else | 445 | else |
444 | { | 446 | { |
@@ -463,7 +465,7 @@ namespace OpenSim.Region.Environment | |||
463 | } | 465 | } |
464 | catch (Exception ex) | 466 | catch (Exception ex) |
465 | { | 467 | { |
466 | MainLog.Instance.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString()); | 468 | m_log.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString()); |
467 | } | 469 | } |
468 | } | 470 | } |
469 | } | 471 | } |
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs index c0c1b73..09fa09b 100644 --- a/OpenSim/Region/Environment/LandManagement/LandManager.cs +++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs | |||
@@ -25,6 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | |||
28 | using System; | 29 | using System; |
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using Axiom.Math; | 31 | using Axiom.Math; |
@@ -38,7 +39,6 @@ using OpenSim.Region.Physics.Manager; | |||
38 | 39 | ||
39 | namespace OpenSim.Region.Environment.LandManagement | 40 | namespace OpenSim.Region.Environment.LandManagement |
40 | { | 41 | { |
41 | |||
42 | #region LandManager Class | 42 | #region LandManager Class |
43 | 43 | ||
44 | /// <summary> | 44 | /// <summary> |
@@ -46,6 +46,8 @@ namespace OpenSim.Region.Environment.LandManagement | |||
46 | /// </summary> | 46 | /// </summary> |
47 | public class LandManager | 47 | public class LandManager |
48 | { | 48 | { |
49 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
50 | |||
49 | #region Constants | 51 | #region Constants |
50 | 52 | ||
51 | //Land types set with flags in ParcelOverlay. | 53 | //Land types set with flags in ParcelOverlay. |
@@ -57,7 +59,6 @@ namespace OpenSim.Region.Environment.LandManagement | |||
57 | public const byte LAND_TYPE_IS_FOR_SALE = (byte) 4; //Equals 00000100 | 59 | public const byte LAND_TYPE_IS_FOR_SALE = (byte) 4; //Equals 00000100 |
58 | public const byte LAND_TYPE_IS_BEING_AUCTIONED = (byte) 5; //Equals 00000101 | 60 | public const byte LAND_TYPE_IS_BEING_AUCTIONED = (byte) 5; //Equals 00000101 |
59 | 61 | ||
60 | |||
61 | //Flags that when set, a border on the given side will be placed | 62 | //Flags that when set, a border on the given side will be placed |
62 | //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) | 63 | //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) |
63 | //This took forever to figure out -- jeesh. /blame LL for even having to send these | 64 | //This took forever to figure out -- jeesh. /blame LL for even having to send these |
@@ -73,7 +74,6 @@ namespace OpenSim.Region.Environment.LandManagement | |||
73 | public const int LAND_SELECT_OBJECTS_GROUP = 4; | 74 | public const int LAND_SELECT_OBJECTS_GROUP = 4; |
74 | public const int LAND_SELECT_OBJECTS_OTHER = 8; | 75 | public const int LAND_SELECT_OBJECTS_OTHER = 8; |
75 | 76 | ||
76 | |||
77 | //These are other constants. Yay! | 77 | //These are other constants. Yay! |
78 | public const int START_LAND_LOCAL_ID = 1; | 78 | public const int START_LAND_LOCAL_ID = 1; |
79 | 79 | ||
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.LandManagement | |||
127 | //} | 127 | //} |
128 | //catch (Exception ex) | 128 | //catch (Exception ex) |
129 | //{ | 129 | //{ |
130 | //MainLog.Instance.Error("LandManager", "IncomingLandObjectsFromStorage: Exception: " + ex.ToString()); | 130 | //m_log.Error("[LandManager]: IncomingLandObjectsFromStorage: Exception: " + ex.ToString()); |
131 | //throw ex; | 131 | //throw ex; |
132 | //} | 132 | //} |
133 | } | 133 | } |
@@ -526,8 +526,7 @@ namespace OpenSim.Region.Environment.LandManagement | |||
526 | } | 526 | } |
527 | catch (Exception e) | 527 | catch (Exception e) |
528 | { | 528 | { |
529 | MainLog.Instance.Debug("LAND", | 529 | m_log.Debug("[LAND]: Skipped Land checks because avatar is out of bounds: " + e.Message); |
530 | "Skipped Land checks because avatar is out of bounds: " + e.Message); | ||
531 | } | 530 | } |
532 | } | 531 | } |
533 | } | 532 | } |
diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs index 76ba14b..d4031d9 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Environment/ModuleLoader.cs | |||
@@ -40,16 +40,16 @@ namespace OpenSim.Region.Environment | |||
40 | { | 40 | { |
41 | public class ModuleLoader | 41 | public class ModuleLoader |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | public Dictionary<string, Assembly> LoadedAssemblys = new Dictionary<string, Assembly>(); | 45 | public Dictionary<string, Assembly> LoadedAssemblys = new Dictionary<string, Assembly>(); |
44 | 46 | ||
45 | private readonly List<IRegionModule> m_loadedModules = new List<IRegionModule>(); | 47 | private readonly List<IRegionModule> m_loadedModules = new List<IRegionModule>(); |
46 | private readonly Dictionary<string, IRegionModule> m_loadedSharedModules = new Dictionary<string, IRegionModule>(); | 48 | private readonly Dictionary<string, IRegionModule> m_loadedSharedModules = new Dictionary<string, IRegionModule>(); |
47 | private readonly LogBase m_log; | ||
48 | private readonly IConfigSource m_config; | 49 | private readonly IConfigSource m_config; |
49 | 50 | ||
50 | public ModuleLoader(LogBase log, IConfigSource config) | 51 | public ModuleLoader(IConfigSource config) |
51 | { | 52 | { |
52 | m_log = log; | ||
53 | m_config = config; | 53 | m_config = config; |
54 | } | 54 | } |
55 | 55 | ||
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Environment | |||
78 | DynamicTextureModule dynamicModule = new DynamicTextureModule(); | 78 | DynamicTextureModule dynamicModule = new DynamicTextureModule(); |
79 | if (m_loadedSharedModules.ContainsKey(dynamicModule.Name)) | 79 | if (m_loadedSharedModules.ContainsKey(dynamicModule.Name)) |
80 | { | 80 | { |
81 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule"); | 81 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule")); |
82 | } | 82 | } |
83 | else | 83 | else |
84 | { | 84 | { |
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment | |||
88 | ChatModule chat = new ChatModule(); | 88 | ChatModule chat = new ChatModule(); |
89 | if (m_loadedSharedModules.ContainsKey(chat.Name)) | 89 | if (m_loadedSharedModules.ContainsKey(chat.Name)) |
90 | { | 90 | { |
91 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule"); | 91 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule")); |
92 | } | 92 | } |
93 | else | 93 | else |
94 | { | 94 | { |
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment | |||
98 | InstantMessageModule imMod = new InstantMessageModule(); | 98 | InstantMessageModule imMod = new InstantMessageModule(); |
99 | if (m_loadedSharedModules.ContainsKey(imMod.Name)) | 99 | if (m_loadedSharedModules.ContainsKey(imMod.Name)) |
100 | { | 100 | { |
101 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule"); | 101 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule")); |
102 | } | 102 | } |
103 | else | 103 | else |
104 | { | 104 | { |
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment | |||
108 | LoadImageURLModule loadMod = new LoadImageURLModule(); | 108 | LoadImageURLModule loadMod = new LoadImageURLModule(); |
109 | if (m_loadedSharedModules.ContainsKey(loadMod.Name)) | 109 | if (m_loadedSharedModules.ContainsKey(loadMod.Name)) |
110 | { | 110 | { |
111 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule"); | 111 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule")); |
112 | } | 112 | } |
113 | else | 113 | else |
114 | { | 114 | { |
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment | |||
118 | AvatarFactoryModule avatarFactory = new AvatarFactoryModule(); | 118 | AvatarFactoryModule avatarFactory = new AvatarFactoryModule(); |
119 | if (m_loadedSharedModules.ContainsKey(avatarFactory.Name)) | 119 | if (m_loadedSharedModules.ContainsKey(avatarFactory.Name)) |
120 | { | 120 | { |
121 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule"); | 121 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule")); |
122 | } | 122 | } |
123 | else | 123 | else |
124 | { | 124 | { |
@@ -128,7 +128,7 @@ namespace OpenSim.Region.Environment | |||
128 | XMLRPCModule xmlRpcMod = new XMLRPCModule(); | 128 | XMLRPCModule xmlRpcMod = new XMLRPCModule(); |
129 | if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name)) | 129 | if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name)) |
130 | { | 130 | { |
131 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule"); | 131 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule")); |
132 | } | 132 | } |
133 | else | 133 | else |
134 | { | 134 | { |
@@ -186,17 +186,17 @@ namespace OpenSim.Region.Environment | |||
186 | 186 | ||
187 | if (modules.Length > 0) | 187 | if (modules.Length > 0) |
188 | { | 188 | { |
189 | m_log.Verbose("MODULES", "Found Module Library [{0}]", dllName); | 189 | m_log.Info(String.Format("[MODULES]: Found Module Library [{0}]", dllName)); |
190 | foreach (IRegionModule module in modules) | 190 | foreach (IRegionModule module in modules) |
191 | { | 191 | { |
192 | if (!module.IsSharedModule) | 192 | if (!module.IsSharedModule) |
193 | { | 193 | { |
194 | m_log.Verbose("MODULES", " [{0}]: Initializing.", module.Name); | 194 | m_log.Info(String.Format("[MODULES]: [{0}]: Initializing.", module.Name)); |
195 | InitializeModule(module, scene); | 195 | InitializeModule(module, scene); |
196 | } | 196 | } |
197 | else | 197 | else |
198 | { | 198 | { |
199 | m_log.Verbose("MODULES", " [{0}]: Loading Shared Module.", module.Name); | 199 | m_log.Info(String.Format("[MODULES]: [{0}]: Loading Shared Module.", module.Name)); |
200 | LoadSharedModule(module); | 200 | LoadSharedModule(module); |
201 | } | 201 | } |
202 | } | 202 | } |
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment | |||
246 | } | 246 | } |
247 | catch (BadImageFormatException) | 247 | catch (BadImageFormatException) |
248 | { | 248 | { |
249 | //m_log.Verbose("MODULES", "The file [{0}] is not a module assembly.", e.FileName); | 249 | //m_log.Info(String.Format("[MODULES]: The file [{0}] is not a module assembly.", e.FileName)); |
250 | } | 250 | } |
251 | } | 251 | } |
252 | 252 | ||
@@ -270,7 +270,7 @@ namespace OpenSim.Region.Environment | |||
270 | } | 270 | } |
271 | catch (ReflectionTypeLoadException) | 271 | catch (ReflectionTypeLoadException) |
272 | { | 272 | { |
273 | m_log.Verbose("MODULES", "Could not load types for [{0}].", pluginAssembly.FullName); | 273 | m_log.Info(String.Format("[MODULES]: Could not load types for [{0}].", pluginAssembly.FullName)); |
274 | } | 274 | } |
275 | } | 275 | } |
276 | 276 | ||
diff --git a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs index 81478a1..d51936b 100644 --- a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs | |||
@@ -41,8 +41,7 @@ namespace OpenSim.Region.Environment.Modules | |||
41 | { | 41 | { |
42 | public class BetaGridLikeMoneyModule: IRegionModule | 42 | public class BetaGridLikeMoneyModule: IRegionModule |
43 | { | 43 | { |
44 | 44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
45 | private LogBase m_log; | ||
46 | 45 | ||
47 | private Dictionary<ulong,Scene> m_scenel = new Dictionary<ulong,Scene>(); | 46 | private Dictionary<ulong,Scene> m_scenel = new Dictionary<ulong,Scene>(); |
48 | 47 | ||
@@ -66,8 +65,6 @@ namespace OpenSim.Region.Environment.Modules | |||
66 | 65 | ||
67 | public void Initialise(Scene scene, IConfigSource config) | 66 | public void Initialise(Scene scene, IConfigSource config) |
68 | { | 67 | { |
69 | m_log = MainLog.Instance; | ||
70 | |||
71 | m_gConfig = config; | 68 | m_gConfig = config; |
72 | ReadConfigAndPopulate(); | 69 | ReadConfigAndPopulate(); |
73 | 70 | ||
@@ -160,11 +157,8 @@ namespace OpenSim.Region.Environment.Modules | |||
160 | } | 157 | } |
161 | else | 158 | else |
162 | { | 159 | { |
163 | 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()); | 160 | 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()); |
164 | } | 161 | } |
165 | |||
166 | |||
167 | |||
168 | } | 162 | } |
169 | 163 | ||
170 | private bool doMoneyTranfer(LLUUID Sender, LLUUID Receiver, int amount) | 164 | private bool doMoneyTranfer(LLUUID Sender, LLUUID Receiver, int amount) |
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index 749a923..82bd2ec 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs | |||
@@ -43,8 +43,9 @@ namespace OpenSim.Region.Environment.Modules | |||
43 | { | 43 | { |
44 | public class ChatModule : IRegionModule, ISimChat | 44 | public class ChatModule : IRegionModule, ISimChat |
45 | { | 45 | { |
46 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | |||
46 | private List<Scene> m_scenes = new List<Scene>(); | 48 | private List<Scene> m_scenes = new List<Scene>(); |
47 | private LogBase m_log; | ||
48 | 49 | ||
49 | private int m_whisperdistance = 10; | 50 | private int m_whisperdistance = 10; |
50 | private int m_saydistance = 30; | 51 | private int m_saydistance = 30; |
@@ -59,11 +60,6 @@ namespace OpenSim.Region.Environment.Modules | |||
59 | internal object m_syncLogout = new object(); | 60 | internal object m_syncLogout = new object(); |
60 | private Thread m_irc_connector=null; | 61 | private Thread m_irc_connector=null; |
61 | 62 | ||
62 | public ChatModule() | ||
63 | { | ||
64 | m_log = MainLog.Instance; | ||
65 | } | ||
66 | |||
67 | public void Initialise(Scene scene, IConfigSource config) | 63 | public void Initialise(Scene scene, IConfigSource config) |
68 | { | 64 | { |
69 | lock (m_syncInit) | 65 | lock (m_syncInit) |
@@ -159,7 +155,7 @@ namespace OpenSim.Region.Environment.Modules | |||
159 | } | 155 | } |
160 | catch (Exception ex) | 156 | catch (Exception ex) |
161 | { | 157 | { |
162 | m_log.Error("IRC", "NewClient exception trap:" + ex.ToString()); | 158 | m_log.Error("[IRC]: NewClient exception trap:" + ex.ToString()); |
163 | } | 159 | } |
164 | } | 160 | } |
165 | 161 | ||
@@ -180,13 +176,13 @@ namespace OpenSim.Region.Environment.Modules | |||
180 | { | 176 | { |
181 | m_last_leaving_user = clientName; | 177 | m_last_leaving_user = clientName; |
182 | m_irc.PrivMsg(m_irc.Nick, "Sim", "notices " + clientName + " left " + clientRegion); | 178 | m_irc.PrivMsg(m_irc.Nick, "Sim", "notices " + clientName + " left " + clientRegion); |
183 | m_log.Verbose("IRC", "IRC watcher notices " + clientName + " left " + clientRegion); | 179 | m_log.Info("[IRC]: IRC watcher notices " + clientName + " left " + clientRegion); |
184 | } | 180 | } |
185 | } | 181 | } |
186 | } | 182 | } |
187 | catch (Exception ex) | 183 | catch (Exception ex) |
188 | { | 184 | { |
189 | m_log.Error("IRC", "ClientLoggedOut exception trap:" + ex.ToString()); | 185 | m_log.Error("[IRC]: ClientLoggedOut exception trap:" + ex.ToString()); |
190 | } | 186 | } |
191 | } | 187 | } |
192 | 188 | ||
@@ -319,6 +315,8 @@ namespace OpenSim.Region.Environment.Modules | |||
319 | 315 | ||
320 | internal class IRCChatModule | 316 | internal class IRCChatModule |
321 | { | 317 | { |
318 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
319 | |||
322 | private string m_server = null; | 320 | private string m_server = null; |
323 | private uint m_port = 6668; | 321 | private uint m_port = 6668; |
324 | private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot"; | 322 | private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot"; |
@@ -341,7 +339,6 @@ namespace OpenSim.Region.Environment.Modules | |||
341 | 339 | ||
342 | private List<Scene> m_scenes = null; | 340 | private List<Scene> m_scenes = null; |
343 | private List<Scene> m_last_scenes = null; | 341 | private List<Scene> m_last_scenes = null; |
344 | private LogBase m_log; | ||
345 | 342 | ||
346 | public IRCChatModule(IConfigSource config) | 343 | public IRCChatModule(IConfigSource config) |
347 | { | 344 | { |
@@ -388,9 +385,8 @@ namespace OpenSim.Region.Environment.Modules | |||
388 | } | 385 | } |
389 | catch (Exception) | 386 | catch (Exception) |
390 | { | 387 | { |
391 | MainLog.Instance.Verbose("CHAT", "No IRC config information, skipping IRC bridge configuration"); | 388 | m_log.Info("[CHAT]: No IRC config information, skipping IRC bridge configuration"); |
392 | } | 389 | } |
393 | m_log = MainLog.Instance; | ||
394 | } | 390 | } |
395 | 391 | ||
396 | public bool Connect(List<Scene> scenes) | 392 | public bool Connect(List<Scene> scenes) |
@@ -404,9 +400,9 @@ namespace OpenSim.Region.Environment.Modules | |||
404 | if (m_last_scenes == null) { m_last_scenes = scenes; } | 400 | if (m_last_scenes == null) { m_last_scenes = scenes; } |
405 | 401 | ||
406 | m_tcp = new TcpClient(m_server, (int)m_port); | 402 | m_tcp = new TcpClient(m_server, (int)m_port); |
407 | m_log.Verbose("IRC", "Connecting..."); | 403 | m_log.Info("[IRC]: Connecting..."); |
408 | m_stream = m_tcp.GetStream(); | 404 | m_stream = m_tcp.GetStream(); |
409 | m_log.Verbose("IRC", "Connected to " + m_server); | 405 | m_log.Info("[IRC]: Connected to " + m_server); |
410 | m_reader = new StreamReader(m_stream); | 406 | m_reader = new StreamReader(m_stream); |
411 | m_writer = new StreamWriter(m_stream); | 407 | m_writer = new StreamWriter(m_stream); |
412 | 408 | ||
@@ -422,7 +418,7 @@ namespace OpenSim.Region.Environment.Modules | |||
422 | m_writer.Flush(); | 418 | m_writer.Flush(); |
423 | m_writer.WriteLine("JOIN " + m_channel); | 419 | m_writer.WriteLine("JOIN " + m_channel); |
424 | m_writer.Flush(); | 420 | m_writer.Flush(); |
425 | m_log.Verbose("IRC", "Connection fully established"); | 421 | m_log.Info("[IRC]: Connection fully established"); |
426 | m_connected = true; | 422 | m_connected = true; |
427 | } | 423 | } |
428 | catch (Exception e) | 424 | catch (Exception e) |
@@ -475,16 +471,16 @@ namespace OpenSim.Region.Environment.Modules | |||
475 | m_writer.WriteLine(m_privmsgformat, m_channel, from, region, msg); | 471 | m_writer.WriteLine(m_privmsgformat, m_channel, from, region, msg); |
476 | } | 472 | } |
477 | m_writer.Flush(); | 473 | m_writer.Flush(); |
478 | m_log.Verbose("IRC", "PrivMsg " + from + " in " + region + " :" + msg); | 474 | m_log.Info("[IRC]: PrivMsg " + from + " in " + region + " :" + msg); |
479 | } | 475 | } |
480 | catch (IOException) | 476 | catch (IOException) |
481 | { | 477 | { |
482 | m_log.Error("IRC", "Disconnected from IRC server.(PrivMsg)"); | 478 | m_log.Error("[IRC]: Disconnected from IRC server.(PrivMsg)"); |
483 | Reconnect(); | 479 | Reconnect(); |
484 | } | 480 | } |
485 | catch (Exception ex) | 481 | catch (Exception ex) |
486 | { | 482 | { |
487 | m_log.Error("IRC", "PrivMsg exception trap:" + ex.ToString()); | 483 | m_log.Error("[IRC]: PrivMsg exception trap:" + ex.ToString()); |
488 | } | 484 | } |
489 | } | 485 | } |
490 | 486 | ||
@@ -493,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules | |||
493 | //examines IRC commands and extracts any private messages | 489 | //examines IRC commands and extracts any private messages |
494 | // which will then be reboadcast in the Sim | 490 | // which will then be reboadcast in the Sim |
495 | 491 | ||
496 | m_log.Verbose("IRC", "ExtractMsg: " + input); | 492 | m_log.Info("[IRC]: ExtractMsg: " + input); |
497 | Dictionary<string, string> result = null; | 493 | Dictionary<string, string> result = null; |
498 | //string regex = @":(?<nick>\w*)!~(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; | 494 | //string regex = @":(?<nick>\w*)!~(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; |
499 | string regex = @":(?<nick>\w*)!(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; | 495 | string regex = @":(?<nick>\w*)!(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; |
@@ -510,10 +506,10 @@ namespace OpenSim.Region.Environment.Modules | |||
510 | } | 506 | } |
511 | else | 507 | else |
512 | { | 508 | { |
513 | m_log.Verbose("IRC", "Number of matches: " + matches.Count); | 509 | m_log.Info("[IRC]: Number of matches: " + matches.Count); |
514 | if (matches.Count > 0) | 510 | if (matches.Count > 0) |
515 | { | 511 | { |
516 | m_log.Verbose("IRC", "Number of groups: " + matches[0].Groups.Count); | 512 | m_log.Info("[IRC]: Number of groups: " + matches[0].Groups.Count); |
517 | } | 513 | } |
518 | } | 514 | } |
519 | return result; | 515 | return result; |
@@ -536,12 +532,12 @@ namespace OpenSim.Region.Environment.Modules | |||
536 | } | 532 | } |
537 | catch (IOException) | 533 | catch (IOException) |
538 | { | 534 | { |
539 | m_log.Error("IRC", "Disconnected from IRC server.(PingRun)"); | 535 | m_log.Error("[IRC]: Disconnected from IRC server.(PingRun)"); |
540 | Reconnect(); | 536 | Reconnect(); |
541 | } | 537 | } |
542 | catch (Exception ex) | 538 | catch (Exception ex) |
543 | { | 539 | { |
544 | m_log.Error("IRC", "PingRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace); | 540 | m_log.Error("[IRC]: PingRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace); |
545 | } | 541 | } |
546 | } | 542 | } |
547 | } | 543 | } |
@@ -552,29 +548,29 @@ namespace OpenSim.Region.Environment.Modules | |||
552 | LLVector3 pos = new LLVector3(128, 128, 20); | 548 | LLVector3 pos = new LLVector3(128, 128, 20); |
553 | while (true) | 549 | while (true) |
554 | { | 550 | { |
555 | try | 551 | try |
556 | { | ||
557 | while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null)) | ||
558 | { | 552 | { |
553 | while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null)) | ||
554 | { | ||
559 | // Console.WriteLine(inputLine); | 555 | // Console.WriteLine(inputLine); |
560 | if (inputLine.Contains(m_channel)) | 556 | if (inputLine.Contains(m_channel)) |
561 | { | 557 | { |
562 | Dictionary<string, string> data = ExtractMsg(inputLine); | 558 | Dictionary<string, string> data = ExtractMsg(inputLine); |
563 | // Any chat ??? | 559 | // Any chat ??? |
564 | if (data != null) | 560 | if (data != null) |
565 | { | 561 | { |
566 | foreach (Scene m_scene in m_scenes) | 562 | foreach (Scene m_scene in m_scenes) |
567 | { | 563 | { |
568 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) | 564 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) |
565 | { | ||
566 | if (!avatar.IsChildAgent) | ||
569 | { | 567 | { |
570 | if (!avatar.IsChildAgent) | 568 | avatar.ControllingClient.SendChatMessage( |
571 | { | 569 | Helpers.StringToField(data["msg"]), 255, |
572 | avatar.ControllingClient.SendChatMessage( | 570 | pos, data["nick"], |
573 | Helpers.StringToField(data["msg"]), 255, | 571 | LLUUID.Zero); |
574 | pos, data["nick"], | 572 | } |
575 | LLUUID.Zero); | 573 | }); |
576 | } | ||
577 | }); | ||
578 | } | 574 | } |
579 | 575 | ||
580 | 576 | ||
@@ -584,24 +580,24 @@ namespace OpenSim.Region.Environment.Modules | |||
584 | // Was an command from the IRC server | 580 | // Was an command from the IRC server |
585 | ProcessIRCCommand(inputLine); | 581 | ProcessIRCCommand(inputLine); |
586 | } | 582 | } |
587 | } | 583 | } |
588 | else | 584 | else |
589 | { | 585 | { |
590 | // Was an command from the IRC server | 586 | // Was an command from the IRC server |
591 | ProcessIRCCommand(inputLine); | 587 | ProcessIRCCommand(inputLine); |
592 | } | 588 | } |
593 | Thread.Sleep(150); | 589 | Thread.Sleep(150); |
594 | } | ||
595 | } | ||
596 | catch (IOException) | ||
597 | { | ||
598 | m_log.Error("IRC", "ListenerRun IOException. Disconnected from IRC server ??? (ListenerRun)"); | ||
599 | Reconnect(); | ||
600 | } | ||
601 | catch (Exception ex) | ||
602 | { | ||
603 | m_log.Error("IRC", "ListenerRun exception trap:" + ex.ToString()+"\n"+ex.StackTrace); | ||
604 | } | 590 | } |
591 | } | ||
592 | catch (IOException) | ||
593 | { | ||
594 | m_log.Error("[IRC]: ListenerRun IOException. Disconnected from IRC server ??? (ListenerRun)"); | ||
595 | Reconnect(); | ||
596 | } | ||
597 | catch (Exception ex) | ||
598 | { | ||
599 | m_log.Error("[IRC]: ListenerRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace); | ||
600 | } | ||
605 | } | 601 | } |
606 | } | 602 | } |
607 | 603 | ||
@@ -626,27 +622,27 @@ namespace OpenSim.Region.Environment.Modules | |||
626 | } | 622 | } |
627 | catch (Exception ex) // IRC gate should not crash Sim | 623 | catch (Exception ex) // IRC gate should not crash Sim |
628 | { | 624 | { |
629 | m_log.Error("IRC", "BroadcastSim Exception Trap:" + ex.ToString() + "\n" + ex.StackTrace); | 625 | m_log.Error("[IRC]: BroadcastSim Exception Trap:" + ex.ToString() + "\n" + ex.StackTrace); |
630 | 626 | ||
631 | } | 627 | } |
632 | |||
633 | |||
634 | } | 628 | } |
629 | |||
635 | public enum ErrorReplies | 630 | public enum ErrorReplies |
636 | { | 631 | { |
637 | NotRegistered = 451, // ":You have not registered" | 632 | NotRegistered = 451, // ":You have not registered" |
638 | NicknameInUse = 433 // "<nick> :Nickname is already in use" | 633 | NicknameInUse = 433 // "<nick> :Nickname is already in use" |
639 | } | 634 | } |
635 | |||
640 | public enum Replies | 636 | public enum Replies |
641 | { | 637 | { |
642 | MotdStart = 375, // ":- <server> Message of the day - " | 638 | MotdStart = 375, // ":- <server> Message of the day - " |
643 | Motd = 372, // ":- <text>" | 639 | Motd = 372, // ":- <text>" |
644 | EndOfMotd = 376 // ":End of /MOTD command" | 640 | EndOfMotd = 376 // ":End of /MOTD command" |
645 | |||
646 | } | 641 | } |
642 | |||
647 | public void ProcessIRCCommand(string command) | 643 | public void ProcessIRCCommand(string command) |
648 | { | 644 | { |
649 | //m_log.Verbose("IRC", "ProcessIRCCommand:"+command); | 645 | //m_log.Info("[IRC]: ProcessIRCCommand:" + command); |
650 | 646 | ||
651 | string[] commArgs = new string[command.Split(' ').Length]; | 647 | string[] commArgs = new string[command.Split(' ').Length]; |
652 | string c_server = m_server; | 648 | string c_server = m_server; |
@@ -656,6 +652,7 @@ namespace OpenSim.Region.Environment.Modules | |||
656 | { | 652 | { |
657 | commArgs[0] = commArgs[0].Remove(0, 1); | 653 | commArgs[0] = commArgs[0].Remove(0, 1); |
658 | } | 654 | } |
655 | |||
659 | if (commArgs[1] == "002") | 656 | if (commArgs[1] == "002") |
660 | { | 657 | { |
661 | // fetch the correct servername | 658 | // fetch the correct servername |
@@ -668,7 +665,7 @@ namespace OpenSim.Region.Environment.Modules | |||
668 | 665 | ||
669 | if (commArgs[0] == "ERROR") | 666 | if (commArgs[0] == "ERROR") |
670 | { | 667 | { |
671 | m_log.Error("IRC", "IRC SERVER ERROR:" + command); | 668 | m_log.Error("[IRC]: IRC SERVER ERROR:" + command); |
672 | } | 669 | } |
673 | 670 | ||
674 | if (commArgs[0] == "PING") | 671 | if (commArgs[0] == "PING") |
@@ -695,7 +692,7 @@ namespace OpenSim.Region.Environment.Modules | |||
695 | case (int)ErrorReplies.NicknameInUse: | 692 | case (int)ErrorReplies.NicknameInUse: |
696 | // Gen a new name | 693 | // Gen a new name |
697 | m_nick = m_basenick + Util.RandomClass.Next(1, 99); | 694 | m_nick = m_basenick + Util.RandomClass.Next(1, 99); |
698 | m_log.Error("IRC", "IRC SERVER reports NicknameInUse, trying " + m_nick); | 695 | m_log.Error("[IRC]: IRC SERVER reports NicknameInUse, trying " + m_nick); |
699 | // Retry | 696 | // Retry |
700 | m_writer.WriteLine("NICK " + m_nick); | 697 | m_writer.WriteLine("NICK " + m_nick); |
701 | m_writer.Flush(); | 698 | m_writer.Flush(); |
diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs index fec28a8..3c324a4 100644 --- a/OpenSim/Region/Environment/Modules/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs | |||
@@ -40,8 +40,7 @@ namespace OpenSim.Region.Environment.Modules | |||
40 | { | 40 | { |
41 | public class FriendsModule : IRegionModule | 41 | public class FriendsModule : IRegionModule |
42 | { | 42 | { |
43 | 43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
44 | private LogBase m_log; | ||
45 | 44 | ||
46 | private Scene m_scene; | 45 | private Scene m_scene; |
47 | 46 | ||
@@ -49,7 +48,6 @@ namespace OpenSim.Region.Environment.Modules | |||
49 | 48 | ||
50 | public void Initialise(Scene scene, IConfigSource config) | 49 | public void Initialise(Scene scene, IConfigSource config) |
51 | { | 50 | { |
52 | m_log = MainLog.Instance; | ||
53 | m_scene = scene; | 51 | m_scene = scene; |
54 | scene.EventManager.OnNewClient += OnNewClient; | 52 | scene.EventManager.OnNewClient += OnNewClient; |
55 | scene.EventManager.OnGridInstantMessageToFriendsModule += OnGridInstantMessage; | 53 | scene.EventManager.OnGridInstantMessageToFriendsModule += OnGridInstantMessage; |
@@ -72,6 +70,7 @@ namespace OpenSim.Region.Environment.Modules | |||
72 | 70 | ||
73 | 71 | ||
74 | } | 72 | } |
73 | |||
75 | private void OnInstantMessage(IClientAPI client,LLUUID fromAgentID, | 74 | private void OnInstantMessage(IClientAPI client,LLUUID fromAgentID, |
76 | LLUUID fromAgentSession, LLUUID toAgentID, | 75 | LLUUID fromAgentSession, LLUUID toAgentID, |
77 | LLUUID imSessionID, uint timestamp, string fromAgentName, | 76 | LLUUID imSessionID, uint timestamp, string fromAgentName, |
@@ -89,13 +88,13 @@ namespace OpenSim.Region.Environment.Modules | |||
89 | 88 | ||
90 | m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); | 89 | m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); |
91 | 90 | ||
92 | m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); | 91 | m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); |
93 | GridInstantMessage msg = new GridInstantMessage(); | 92 | GridInstantMessage msg = new GridInstantMessage(); |
94 | msg.fromAgentID = fromAgentID.UUID; | 93 | msg.fromAgentID = fromAgentID.UUID; |
95 | msg.fromAgentSession = fromAgentSession.UUID; | 94 | msg.fromAgentSession = fromAgentSession.UUID; |
96 | msg.toAgentID = toAgentID.UUID; | 95 | msg.toAgentID = toAgentID.UUID; |
97 | msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here | 96 | msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here |
98 | m_log.Verbose("FRIEND","Filling Session: " + msg.imSessionID.ToString()); | 97 | m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString()); |
99 | msg.timestamp = timestamp; | 98 | msg.timestamp = timestamp; |
100 | if (client != null) | 99 | if (client != null) |
101 | { | 100 | { |
@@ -115,20 +114,18 @@ namespace OpenSim.Region.Environment.Modules | |||
115 | msg.binaryBucket = binaryBucket; | 114 | msg.binaryBucket = binaryBucket; |
116 | m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); | 115 | m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); |
117 | } | 116 | } |
117 | |||
118 | // 39 == Accept Friendship | ||
118 | if (dialog == (byte)39) | 119 | if (dialog == (byte)39) |
119 | { | 120 | { |
120 | m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); | 121 | m_log.Info("[FRIEND]: 39 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); |
121 | |||
122 | } | 122 | } |
123 | |||
124 | // 40 == Decline Friendship | ||
123 | if (dialog == (byte)40) | 125 | if (dialog == (byte)40) |
124 | { | 126 | { |
125 | m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); | 127 | m_log.Info("[FRIEND]: 40 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); |
126 | } | 128 | } |
127 | |||
128 | // 39 == Accept Friendship | ||
129 | |||
130 | // 40 == Decline Friendship | ||
131 | |||
132 | } | 129 | } |
133 | 130 | ||
134 | private void OnApprovedFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) | 131 | private void OnApprovedFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) |
@@ -160,6 +157,7 @@ namespace OpenSim.Region.Environment.Modules | |||
160 | // TODO: Inform agent that the friend is online | 157 | // TODO: Inform agent that the friend is online |
161 | } | 158 | } |
162 | } | 159 | } |
160 | |||
163 | private void OnDenyFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) | 161 | private void OnDenyFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) |
164 | { | 162 | { |
165 | if (m_pendingFriendRequests.ContainsKey(transactionID)) | 163 | if (m_pendingFriendRequests.ContainsKey(transactionID)) |
@@ -184,20 +182,15 @@ namespace OpenSim.Region.Environment.Modules | |||
184 | msg.binaryBucket = new byte[0]; | 182 | msg.binaryBucket = new byte[0]; |
185 | m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); | 183 | m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); |
186 | m_pendingFriendRequests.Remove(transactionID); | 184 | m_pendingFriendRequests.Remove(transactionID); |
187 | |||
188 | } | 185 | } |
189 | |||
190 | |||
191 | } | 186 | } |
192 | 187 | ||
193 | private void OnTerminateFriendship(IClientAPI client, LLUUID agent, LLUUID exfriendID) | 188 | private void OnTerminateFriendship(IClientAPI client, LLUUID agent, LLUUID exfriendID) |
194 | { | 189 | { |
195 | m_scene.StoreRemoveFriendship(agent, exfriendID); | 190 | m_scene.StoreRemoveFriendship(agent, exfriendID); |
196 | // TODO: Inform the client that the ExFriend is offline | 191 | // TODO: Inform the client that the ExFriend is offline |
197 | |||
198 | } | 192 | } |
199 | 193 | ||
200 | |||
201 | private void OnGridInstantMessage(GridInstantMessage msg) | 194 | private void OnGridInstantMessage(GridInstantMessage msg) |
202 | { | 195 | { |
203 | // Trigger the above event handler | 196 | // Trigger the above event handler |
@@ -206,16 +199,12 @@ namespace OpenSim.Region.Environment.Modules | |||
206 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, | 199 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, |
207 | new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), | 200 | new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), |
208 | msg.binaryBucket); | 201 | msg.binaryBucket); |
209 | |||
210 | } | 202 | } |
211 | 203 | ||
212 | |||
213 | public void PostInitialise() | 204 | public void PostInitialise() |
214 | { | 205 | { |
215 | } | 206 | } |
216 | 207 | ||
217 | |||
218 | |||
219 | public void Close() | 208 | public void Close() |
220 | { | 209 | { |
221 | } | 210 | } |
@@ -230,4 +219,4 @@ namespace OpenSim.Region.Environment.Modules | |||
230 | get { return false; } | 219 | get { return false; } |
231 | } | 220 | } |
232 | } | 221 | } |
233 | } \ No newline at end of file | 222 | } |
diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs index f5eb052..e0b3138 100644 --- a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs | |||
@@ -39,12 +39,6 @@ namespace OpenSim.Region.Environment.Modules | |||
39 | public class InstantMessageModule : IRegionModule | 39 | public class InstantMessageModule : IRegionModule |
40 | { | 40 | { |
41 | private List<Scene> m_scenes = new List<Scene>(); | 41 | private List<Scene> m_scenes = new List<Scene>(); |
42 | private LogBase m_log; | ||
43 | |||
44 | public InstantMessageModule() | ||
45 | { | ||
46 | m_log = MainLog.Instance; | ||
47 | } | ||
48 | 42 | ||
49 | public void Initialise(Scene scene, IConfigSource config) | 43 | public void Initialise(Scene scene, IConfigSource config) |
50 | { | 44 | { |
@@ -68,7 +62,6 @@ namespace OpenSim.Region.Environment.Modules | |||
68 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, | 62 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, |
69 | byte[] binaryBucket) | 63 | byte[] binaryBucket) |
70 | { | 64 | { |
71 | |||
72 | bool FriendDialog = ((dialog == (byte)38) || (dialog == (byte)39) || (dialog == (byte)40)); | 65 | bool FriendDialog = ((dialog == (byte)38) || (dialog == (byte)39) || (dialog == (byte)40)); |
73 | 66 | ||
74 | // IM dialogs need to be pre-processed and have their sessionID filled by the server | 67 | // IM dialogs need to be pre-processed and have their sessionID filled by the server |
diff --git a/OpenSim/Region/Environment/Modules/SunModule.cs b/OpenSim/Region/Environment/Modules/SunModule.cs index bd6cd63..d2572c0 100644 --- a/OpenSim/Region/Environment/Modules/SunModule.cs +++ b/OpenSim/Region/Environment/Modules/SunModule.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Region.Environment.Modules | |||
39 | { | 39 | { |
40 | public class SunModule : IRegionModule | 40 | public class SunModule : IRegionModule |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | private const double m_real_day = 24.0; | 44 | private const double m_real_day = 24.0; |
43 | private const int m_default_frame = 100; | 45 | private const int m_default_frame = 100; |
44 | private int m_frame_mod; | 46 | private int m_frame_mod; |
@@ -48,7 +50,6 @@ namespace OpenSim.Region.Environment.Modules | |||
48 | private long m_start; | 50 | private long m_start; |
49 | 51 | ||
50 | private Scene m_scene; | 52 | private Scene m_scene; |
51 | private LogBase m_log; | ||
52 | 53 | ||
53 | public void Initialise(Scene scene, IConfigSource config) | 54 | public void Initialise(Scene scene, IConfigSource config) |
54 | { | 55 | { |
@@ -69,7 +70,6 @@ namespace OpenSim.Region.Environment.Modules | |||
69 | 70 | ||
70 | m_dilation = (int) (m_real_day/m_day_length); | 71 | m_dilation = (int) (m_real_day/m_day_length); |
71 | m_scene = scene; | 72 | m_scene = scene; |
72 | m_log = MainLog.Instance; | ||
73 | scene.EventManager.OnFrame += SunUpdate; | 73 | scene.EventManager.OnFrame += SunUpdate; |
74 | scene.EventManager.OnNewClient += SunToClient; | 74 | scene.EventManager.OnNewClient += SunToClient; |
75 | } | 75 | } |
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Modules | |||
104 | m_frame++; | 104 | m_frame++; |
105 | return; | 105 | return; |
106 | } | 106 | } |
107 | // m_log.Verbose("SUN","I've got an update {0} => {1}", m_scene.RegionsInfo.RegionName, HourOfTheDay()); | 107 | // m_log.Info("[SUN]: I've got an update {0} => {1}", m_scene.RegionsInfo.RegionName, HourOfTheDay()); |
108 | List<ScenePresence> avatars = m_scene.GetAvatars(); | 108 | List<ScenePresence> avatars = m_scene.GetAvatars(); |
109 | foreach (ScenePresence avatar in avatars) | 109 | foreach (ScenePresence avatar in avatars) |
110 | { | 110 | { |
@@ -191,4 +191,4 @@ namespace OpenSim.Region.Environment.Modules | |||
191 | // // OutPacket(viewertime); | 191 | // // OutPacket(viewertime); |
192 | // } | 192 | // } |
193 | } | 193 | } |
194 | } \ No newline at end of file | 194 | } |
diff --git a/OpenSim/Region/Environment/Modules/TextureSender.cs b/OpenSim/Region/Environment/Modules/TextureSender.cs index a533078..053a558 100644 --- a/OpenSim/Region/Environment/Modules/TextureSender.cs +++ b/OpenSim/Region/Environment/Modules/TextureSender.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.Environment.Modules | |||
36 | { | 36 | { |
37 | public class TextureSender | 37 | public class TextureSender |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | public int counter = 0; | 41 | public int counter = 0; |
40 | private AssetBase m_asset; | 42 | private AssetBase m_asset; |
41 | public long DataPointer = 0; | 43 | public long DataPointer = 0; |
@@ -135,9 +137,8 @@ namespace OpenSim.Region.Environment.Modules | |||
135 | } | 137 | } |
136 | catch (ArgumentOutOfRangeException) | 138 | catch (ArgumentOutOfRangeException) |
137 | { | 139 | { |
138 | MainLog.Instance.Error("TEXTURE", | 140 | m_log.Error("[TEXTURE]: Unable to separate texture into multiple packets: Array bounds failure on asset:" + |
139 | "Unable to separate texture into multiple packets: Array bounds failure on asset:" + | 141 | m_asset.FullID.ToString() ); |
140 | m_asset.FullID.ToString() ); | ||
141 | return; | 142 | return; |
142 | } | 143 | } |
143 | RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); | 144 | RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); |
diff --git a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs index 76c6a53..762e76d 100644 --- a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs +++ b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs | |||
@@ -75,6 +75,8 @@ namespace OpenSim.Region.Environment.Modules | |||
75 | { | 75 | { |
76 | public class XMLRPCModule : IRegionModule, IXMLRPC | 76 | public class XMLRPCModule : IRegionModule, IXMLRPC |
77 | { | 77 | { |
78 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
79 | |||
78 | private Scene m_scene; | 80 | private Scene m_scene; |
79 | private Queue<RPCRequestInfo> rpcQueue = new Queue<RPCRequestInfo>(); | 81 | private Queue<RPCRequestInfo> rpcQueue = new Queue<RPCRequestInfo>(); |
80 | private object XMLRPCListLock = new object(); | 82 | private object XMLRPCListLock = new object(); |
@@ -83,7 +85,6 @@ namespace OpenSim.Region.Environment.Modules | |||
83 | private int RemoteReplyScriptTimeout = 900; | 85 | private int RemoteReplyScriptTimeout = 900; |
84 | private int m_remoteDataPort = 0; | 86 | private int m_remoteDataPort = 0; |
85 | private List<Scene> m_scenes = new List<Scene>(); | 87 | private List<Scene> m_scenes = new List<Scene>(); |
86 | private LogBase m_log; | ||
87 | 88 | ||
88 | // <channel id, RPCChannelInfo> | 89 | // <channel id, RPCChannelInfo> |
89 | private Dictionary<LLUUID, RPCChannelInfo> m_openChannels; | 90 | private Dictionary<LLUUID, RPCChannelInfo> m_openChannels; |
@@ -91,11 +92,6 @@ namespace OpenSim.Region.Environment.Modules | |||
91 | // <channel id, RPCRequestInfo> | 92 | // <channel id, RPCRequestInfo> |
92 | private Dictionary<LLUUID, RPCRequestInfo> m_pendingResponse; | 93 | private Dictionary<LLUUID, RPCRequestInfo> m_pendingResponse; |
93 | 94 | ||
94 | public XMLRPCModule() | ||
95 | { | ||
96 | m_log = MainLog.Instance; | ||
97 | } | ||
98 | |||
99 | public void Initialise(Scene scene, IConfigSource config) | 95 | public void Initialise(Scene scene, IConfigSource config) |
100 | { | 96 | { |
101 | try | 97 | try |
@@ -123,8 +119,8 @@ namespace OpenSim.Region.Environment.Modules | |||
123 | 119 | ||
124 | // Start http server | 120 | // Start http server |
125 | // Attach xmlrpc handlers | 121 | // Attach xmlrpc handlers |
126 | m_log.Verbose("REMOTE_DATA", | 122 | m_log.Info("[REMOTE_DATA]: " + |
127 | "Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands."); | 123 | "Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands."); |
128 | BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort); | 124 | BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort); |
129 | httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData); | 125 | httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData); |
130 | httpServer.Start(); | 126 | httpServer.Start(); |
@@ -413,4 +409,4 @@ namespace OpenSim.Region.Environment.Modules | |||
413 | return m_localID; | 409 | return m_localID; |
414 | } | 410 | } |
415 | } | 411 | } |
416 | } \ No newline at end of file | 412 | } |
diff --git a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs index 18a87cb..daaa319 100644 --- a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs +++ b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
35 | { | 35 | { |
36 | public class AvatarAnimations | 36 | public class AvatarAnimations |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>(); | 40 | public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>(); |
39 | public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>(); | 41 | public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>(); |
40 | 42 | ||
@@ -44,7 +46,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
44 | 46 | ||
45 | public void LoadAnims() | 47 | public void LoadAnims() |
46 | { | 48 | { |
47 | //MainLog.Instance.Verbose("CLIENT", "Loading avatar animations"); | 49 | //m_log.Info("[CLIENT]: Loading avatar animations"); |
48 | using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml")) | 50 | using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml")) |
49 | { | 51 | { |
50 | XmlDocument doc = new XmlDocument(); | 52 | XmlDocument doc = new XmlDocument(); |
@@ -58,7 +60,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
58 | } | 60 | } |
59 | } | 61 | } |
60 | 62 | ||
61 | // MainLog.Instance.Verbose("CLIENT", "Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); | 63 | // m_log.Info("[CLIENT]: Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); |
62 | 64 | ||
63 | try | 65 | try |
64 | { | 66 | { |
@@ -70,7 +72,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
70 | } | 72 | } |
71 | catch (InvalidOperationException) | 73 | catch (InvalidOperationException) |
72 | { | 74 | { |
73 | MainLog.Instance.Warn("AVATAR", "Unable to load animation names for an Avatar"); | 75 | m_log.Warn("[AVATAR]: Unable to load animation names for an Avatar"); |
74 | } | 76 | } |
75 | } | 77 | } |
76 | } | 78 | } |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 6c0ed28..49aeaf9 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
42 | 42 | ||
43 | public class InnerScene | 43 | public class InnerScene |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | #region Events | 47 | #region Events |
46 | 48 | ||
47 | public event PhysicsCrash UnRecoverableError; | 49 | public event PhysicsCrash UnRecoverableError; |
@@ -227,13 +229,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
227 | if (child) | 229 | if (child) |
228 | { | 230 | { |
229 | m_numChildAgents++; | 231 | m_numChildAgents++; |
230 | MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new child agent."); | 232 | m_log.Info("[SCENE]: " + m_regInfo.RegionName + ": Creating new child agent."); |
231 | } | 233 | } |
232 | else | 234 | else |
233 | { | 235 | { |
234 | m_numRootAgents++; | 236 | m_numRootAgents++; |
235 | MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new root agent."); | 237 | m_log.Info("[SCENE]: " + m_regInfo.RegionName + ": Creating new root agent."); |
236 | MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Adding Physical agent."); | 238 | m_log.Info("[SCENE]: " + m_regInfo.RegionName + ": Adding Physical agent."); |
237 | 239 | ||
238 | newAvatar.AddToPhysicalScene(); | 240 | newAvatar.AddToPhysicalScene(); |
239 | } | 241 | } |
@@ -542,7 +544,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
542 | LLVector3 oLoc = ((SceneObjectGroup)ent).AbsolutePosition; | 544 | LLVector3 oLoc = ((SceneObjectGroup)ent).AbsolutePosition; |
543 | float distResult = (float)Util.GetDistanceTo(presence.AbsolutePosition,oLoc); | 545 | float distResult = (float)Util.GetDistanceTo(presence.AbsolutePosition,oLoc); |
544 | 546 | ||
545 | //MainLog.Instance.Verbose("DISTANCE", distResult.ToString()); | 547 | //m_log.Info("[DISTANCE]: " + distResult.ToString()); |
546 | 548 | ||
547 | if (distResult > 60) | 549 | if (distResult > 60) |
548 | { | 550 | { |
@@ -897,9 +899,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
897 | } | 899 | } |
898 | else | 900 | else |
899 | { | 901 | { |
900 | MainLog.Instance.Verbose("SCENE", | 902 | m_log.Info(String.Format("[SCENE]: " + |
901 | "DelinkObjects(): Could not find a root prim out of {0} as given to a delink request!", | 903 | "DelinkObjects(): Could not find a root prim out of {0} as given to a delink request!", |
902 | primIds); | 904 | primIds)); |
903 | } | 905 | } |
904 | } | 906 | } |
905 | 907 | ||
@@ -947,7 +949,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
947 | } | 949 | } |
948 | else | 950 | else |
949 | { | 951 | { |
950 | MainLog.Instance.Warn("SCENE", "Attempted to duplicate nonexistant prim id {0}", GroupID); | 952 | m_log.Warn(String.Format("[SCENE]: Attempted to duplicate nonexistant prim id {0}", GroupID)); |
951 | } | 953 | } |
952 | } | 954 | } |
953 | 955 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 81783f8..28760fd 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using libsecondlife.Packets; | 32 | using libsecondlife.Packets; |
@@ -37,12 +38,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
37 | { | 38 | { |
38 | public partial class Scene | 39 | public partial class Scene |
39 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
40 | /// <summary> | 43 | /// <summary> |
41 | /// Start all the scripts in the scene which should be started. | 44 | /// Start all the scripts in the scene which should be started. |
42 | /// </summary> | 45 | /// </summary> |
43 | public void StartScripts() | 46 | public void StartScripts() |
44 | { | 47 | { |
45 | MainLog.Instance.Verbose("PRIMINVENTORY", "Starting scripts in scene"); | 48 | m_log.Info("[PRIMINVENTORY]: Starting scripts in scene"); |
46 | 49 | ||
47 | foreach (SceneObjectGroup group in Entities.Values) | 50 | foreach (SceneObjectGroup group in Entities.Values) |
48 | { | 51 | { |
@@ -80,8 +83,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
80 | 83 | ||
81 | if (!TryGetAvatar(avatarId, out avatar)) | 84 | if (!TryGetAvatar(avatarId, out avatar)) |
82 | { | 85 | { |
83 | MainLog.Instance.Error( | 86 | m_log.Error(String.Format( |
84 | "AGENTINVENTORY", "Could not find avatar {0} to add inventory item", avatarId); | 87 | "[AGENTINVENTORY]: Could not find avatar {0} to add inventory item", avatarId)); |
85 | return; | 88 | return; |
86 | } | 89 | } |
87 | 90 | ||
@@ -143,10 +146,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
143 | } | 146 | } |
144 | else | 147 | else |
145 | { | 148 | { |
146 | MainLog.Instance.Error( | 149 | m_log.Error(String.Format( |
147 | "AGENTINVENTORY", | 150 | "[AGENTINVENTORY]: " + |
148 | "Avatar {0} cannot be found to update its inventory item asset", | 151 | "Avatar {0} cannot be found to update its inventory item asset", |
149 | avatarId); | 152 | avatarId)); |
150 | } | 153 | } |
151 | 154 | ||
152 | return LLUUID.Zero; | 155 | return LLUUID.Zero; |
@@ -168,10 +171,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
168 | SceneObjectGroup group = part.ParentGroup; | 171 | SceneObjectGroup group = part.ParentGroup; |
169 | if (null == group) | 172 | if (null == group) |
170 | { | 173 | { |
171 | MainLog.Instance.Error( | 174 | m_log.Error(String.Format( |
172 | "PRIMINVENTORY", | 175 | "[PRIMINVENTORY]: " + |
173 | "Prim inventory update requested for item ID {0} in prim ID {1} but this prim does not exist", | 176 | "Prim inventory update requested for item ID {0} in prim ID {1} but this prim does not exist", |
174 | itemId, primId); | 177 | itemId, primId)); |
175 | 178 | ||
176 | return; | 179 | return; |
177 | } | 180 | } |
@@ -217,10 +220,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
217 | } | 220 | } |
218 | else | 221 | else |
219 | { | 222 | { |
220 | MainLog.Instance.Error( | 223 | m_log.Error(String.Format( |
221 | "PRIMINVENTORY", | 224 | "[PRIMINVENTORY]: " + |
222 | "Avatar {0} cannot be found to update its prim item asset", | 225 | "Avatar {0} cannot be found to update its prim item asset", |
223 | avatarId); | 226 | avatarId)); |
224 | } | 227 | } |
225 | } | 228 | } |
226 | 229 | ||
@@ -289,16 +292,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
289 | } | 292 | } |
290 | else | 293 | else |
291 | { | 294 | { |
292 | MainLog.Instance.Error( | 295 | m_log.Error( |
293 | "AGENTINVENTORY", | 296 | "[AGENTINVENTORY]: Item ID " + itemID + " not found for an inventory item update."); |
294 | "Item ID " + itemID + " not found for an inventory item update."); | ||
295 | } | 297 | } |
296 | } | 298 | } |
297 | else | 299 | else |
298 | { | 300 | { |
299 | MainLog.Instance.Error( | 301 | m_log.Error( |
300 | "AGENTINVENTORY", | 302 | "[AGENTINVENTORY]: Agent ID " + remoteClient.AgentId + " not found for an inventory item update."); |
301 | "Agent ID " + remoteClient.AgentId + " not found for an inventory item update."); | ||
302 | } | 303 | } |
303 | } | 304 | } |
304 | 305 | ||
@@ -311,7 +312,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
311 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(oldAgentID); | 312 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(oldAgentID); |
312 | if (userInfo == null) | 313 | if (userInfo == null) |
313 | { | 314 | { |
314 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find user " + oldAgentID.ToString()); | 315 | m_log.Error("[AGENTINVENTORY]: Failed to find user " + oldAgentID.ToString()); |
315 | return; | 316 | return; |
316 | } | 317 | } |
317 | 318 | ||
@@ -320,13 +321,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
320 | item = userInfo.RootFolder.HasItem(oldItemID); | 321 | item = userInfo.RootFolder.HasItem(oldItemID); |
321 | if (item == null) | 322 | if (item == null) |
322 | { | 323 | { |
323 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + oldItemID.ToString()); | 324 | m_log.Error("[AGENTINVENTORY]: Failed to find item " + oldItemID.ToString()); |
324 | return; | 325 | return; |
325 | } | 326 | } |
326 | } | 327 | } |
327 | else | 328 | else |
328 | { | 329 | { |
329 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + oldItemID.ToString()); | 330 | m_log.Error("[AGENTINVENTORY]: Failed to find item " + oldItemID.ToString()); |
330 | return; | 331 | return; |
331 | } | 332 | } |
332 | } | 333 | } |
@@ -335,7 +336,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
335 | AssetBase asset = AssetCache.CopyAsset(item.assetID); | 336 | AssetBase asset = AssetCache.CopyAsset(item.assetID); |
336 | if (asset == null) | 337 | if (asset == null) |
337 | { | 338 | { |
338 | MainLog.Instance.Warn("AGENTINVENTORY", "Failed to find asset " + item.assetID.ToString()); | 339 | m_log.Warn("[AGENTINVENTORY]: Failed to find asset " + item.assetID.ToString()); |
339 | return; | 340 | return; |
340 | } | 341 | } |
341 | 342 | ||
@@ -360,14 +361,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
360 | public void MoveInventoryItem(IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, | 361 | public void MoveInventoryItem(IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, |
361 | string newName) | 362 | string newName) |
362 | { | 363 | { |
363 | MainLog.Instance.Verbose( | 364 | m_log.Info( |
364 | "AGENTINVENTORY", | 365 | "[AGENTINVENTORY]: " + |
365 | "Moving item for " + remoteClient.AgentId.ToString()); | 366 | "Moving item for " + remoteClient.AgentId.ToString()); |
366 | 367 | ||
367 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 368 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
368 | if (userInfo == null) | 369 | if (userInfo == null) |
369 | { | 370 | { |
370 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find user " + remoteClient.AgentId.ToString()); | 371 | m_log.Error("[AGENTINVENTORY]: Failed to find user " + remoteClient.AgentId.ToString()); |
371 | return; | 372 | return; |
372 | } | 373 | } |
373 | 374 | ||
@@ -388,13 +389,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
388 | } | 389 | } |
389 | else | 390 | else |
390 | { | 391 | { |
391 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + itemID.ToString()); | 392 | m_log.Error("[AGENTINVENTORY]: Failed to find item " + itemID.ToString()); |
392 | return; | 393 | return; |
393 | } | 394 | } |
394 | } | 395 | } |
395 | else | 396 | else |
396 | { | 397 | { |
397 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + itemID.ToString() + ", no root folder"); | 398 | m_log.Error("[AGENTINVENTORY]: Failed to find item " + itemID.ToString() + ", no root folder"); |
398 | return; | 399 | return; |
399 | } | 400 | } |
400 | } | 401 | } |
@@ -497,8 +498,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
497 | } | 498 | } |
498 | else | 499 | else |
499 | { | 500 | { |
500 | MainLog.Instance.Error( | 501 | m_log.Error(String.Format( |
501 | "PRIMINVENTORY", "Inventory requested of prim {0} which doesn't exist", primLocalID); | 502 | "[PRIMINVENTORY]: Inventory requested of prim {0} which doesn't exist", primLocalID)); |
502 | } | 503 | } |
503 | } | 504 | } |
504 | 505 | ||
@@ -523,11 +524,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
523 | } | 524 | } |
524 | else | 525 | else |
525 | { | 526 | { |
526 | MainLog.Instance.Error( | 527 | m_log.Error(String.Format( |
527 | "PRIMINVENTORY", | 528 | "[PRIMINVENTORY]: " + |
528 | "Removal of item {0} requested of prim {1} but this prim does not exist", | 529 | "Removal of item {0} requested of prim {1} but this prim does not exist", |
529 | itemID, | 530 | itemID, |
530 | localID); | 531 | localID)); |
531 | } | 532 | } |
532 | } | 533 | } |
533 | 534 | ||
@@ -547,18 +548,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
547 | { | 548 | { |
548 | // TODO Retrieve itemID from client's inventory to pass on | 549 | // TODO Retrieve itemID from client's inventory to pass on |
549 | //group.AddInventoryItem(remoteClient, primLocalID, null); | 550 | //group.AddInventoryItem(remoteClient, primLocalID, null); |
550 | MainLog.Instance.Verbose( | 551 | m_log.Info(String.Format( |
551 | "PRIMINVENTORY", | 552 | "[PRIMINVENTORY]: " + |
552 | "Non script prim inventory not yet implemented!" | 553 | "Non script prim inventory not yet implemented!" |
553 | + "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}", | 554 | + "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}", |
554 | itemID, folderID, primLocalID, remoteClient.Name); | 555 | itemID, folderID, primLocalID, remoteClient.Name)); |
555 | } | 556 | } |
556 | else | 557 | else |
557 | { | 558 | { |
558 | MainLog.Instance.Warn( | 559 | m_log.Warn(String.Format( |
559 | "PRIMINVENTORY", | 560 | "[PRIMINVENTORY]: " + |
560 | "Update with item {0} requested of prim {1} for {2} but this prim does not exist", | 561 | "Update with item {0} requested of prim {1} for {2} but this prim does not exist", |
561 | itemID, primLocalID, remoteClient.Name); | 562 | itemID, primLocalID, remoteClient.Name)); |
562 | } | 563 | } |
563 | } | 564 | } |
564 | 565 | ||
@@ -596,25 +597,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
596 | group.StartScript(localID, copyID); | 597 | group.StartScript(localID, copyID); |
597 | group.GetProperites(remoteClient); | 598 | group.GetProperites(remoteClient); |
598 | 599 | ||
599 | // MainLog.Instance.Verbose( | 600 | // m_log.Info( |
600 | // "PRIMINVENTORY", | 601 | // String.Format("[PRIMINVENTORY]: " + |
601 | // "Rezzed script {0} into prim local ID {1} for user {2}", | 602 | // "Rezzed script {0} into prim local ID {1} for user {2}", |
602 | // item.inventoryName, localID, remoteClient.Name); | 603 | // item.inventoryName, localID, remoteClient.Name)); |
603 | } | 604 | } |
604 | else | 605 | else |
605 | { | 606 | { |
606 | MainLog.Instance.Error( | 607 | m_log.Error(String.Format( |
607 | "PRIMINVENTORY", | 608 | "[PRIMINVENTORY]: " + |
608 | "Could not rez script {0} into prim local ID {1} for user {2}" | 609 | "Could not rez script {0} into prim local ID {1} for user {2}" |
609 | + " because the prim could not be found in the region!", | 610 | + " because the prim could not be found in the region!", |
610 | item.inventoryName, localID, remoteClient.Name); | 611 | item.inventoryName, localID, remoteClient.Name)); |
611 | } | 612 | } |
612 | } | 613 | } |
613 | else | 614 | else |
614 | { | 615 | { |
615 | MainLog.Instance.Error( | 616 | m_log.Error(String.Format( |
616 | "PRIMINVENTORY", "Could not find script inventory item {0} to rez for {1}!", | 617 | "[PRIMINVENTORY]: Could not find script inventory item {0} to rez for {1}!", |
617 | itemID, remoteClient.Name); | 618 | itemID, remoteClient.Name)); |
618 | } | 619 | } |
619 | } | 620 | } |
620 | } | 621 | } |
@@ -646,7 +647,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
646 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) | 647 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) |
647 | { | 648 | { |
648 | EntityBase selectedEnt = null; | 649 | EntityBase selectedEnt = null; |
649 | //MainLog.Instance.Verbose("CLIENT", "LocalID:" + Data.ObjectLocalID.ToString()); | 650 | //m_log.Info("[CLIENT]: LocalID:" + Data.ObjectLocalID.ToString()); |
650 | 651 | ||
651 | List<EntityBase> EntitieList = GetEntities(); | 652 | List<EntityBase> EntitieList = GetEntities(); |
652 | 653 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 1d688e3..a724ac0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -270,12 +270,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
270 | 270 | ||
271 | RegisterDefaultSceneEvents(); | 271 | RegisterDefaultSceneEvents(); |
272 | 272 | ||
273 | MainLog.Instance.Verbose("SCENE", "Creating new entitities instance"); | 273 | m_log.Info("[SCENE]: Creating new entitities instance"); |
274 | Entities = new Dictionary<LLUUID, EntityBase>(); | 274 | Entities = new Dictionary<LLUUID, EntityBase>(); |
275 | m_scenePresences = new Dictionary<LLUUID, ScenePresence>(); | 275 | m_scenePresences = new Dictionary<LLUUID, ScenePresence>(); |
276 | //m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>(); | 276 | //m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>(); |
277 | 277 | ||
278 | MainLog.Instance.Verbose("SCENE", "Creating LandMap"); | 278 | m_log.Info("[SCENE]: Creating LandMap"); |
279 | Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY); | 279 | Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY); |
280 | 280 | ||
281 | ScenePresence.LoadAnims(); | 281 | ScenePresence.LoadAnims(); |
@@ -365,16 +365,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
365 | { | 365 | { |
366 | // This means that we're not booted up completely yet. | 366 | // This means that we're not booted up completely yet. |
367 | // This shouldn't happen too often anymore. | 367 | // This shouldn't happen too often anymore. |
368 | MainLog.Instance.Error("SCENE", | 368 | m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception"); |
369 | "Couldn't inform client of regionup because we got a null reference exception"); | ||
370 | } | 369 | } |
371 | } | 370 | } |
372 | else | 371 | else |
373 | { | 372 | { |
374 | MainLog.Instance.Verbose("INTERGRID", | 373 | m_log.Info("[INTERGRID]: Got notice about far away Region: " + otherRegion.RegionName.ToString() + |
375 | "Got notice about far away Region: " + otherRegion.RegionName.ToString() + | 374 | " at (" + otherRegion.RegionLocX.ToString() + ", " + |
376 | " at (" + otherRegion.RegionLocX.ToString() + ", " + | 375 | otherRegion.RegionLocY.ToString() + ")"); |
377 | otherRegion.RegionLocY.ToString() + ")"); | ||
378 | } | 376 | } |
379 | } | 377 | } |
380 | return true; | 378 | return true; |
@@ -402,7 +400,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
402 | m_RestartTimerCounter = 0; | 400 | m_RestartTimerCounter = 0; |
403 | m_restartTimer.AutoReset = true; | 401 | m_restartTimer.AutoReset = true; |
404 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 402 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
405 | MainLog.Instance.Error("REGION", "Restarting Region in " + (seconds/60) + " minutes"); | 403 | m_log.Error("[REGION]: Restarting Region in " + (seconds/60) + " minutes"); |
406 | m_restartTimer.Start(); | 404 | m_restartTimer.Start(); |
407 | SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes"); | 405 | SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes"); |
408 | //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); | 406 | //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); |
@@ -436,9 +434,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
436 | // This causes the region to restart immediatley. | 434 | // This causes the region to restart immediatley. |
437 | public void RestartNow() | 435 | public void RestartNow() |
438 | { | 436 | { |
439 | MainLog.Instance.Error("REGION", "Closing"); | 437 | m_log.Error("[REGION]: Closing"); |
440 | Close(); | 438 | Close(); |
441 | MainLog.Instance.Error("REGION", "Firing Region Restart Message"); | 439 | m_log.Error("[REGION]: Firing Region Restart Message"); |
442 | base.Restart(0); | 440 | base.Restart(0); |
443 | } | 441 | } |
444 | 442 | ||
@@ -485,7 +483,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
485 | if (m_scripts_enabled != !ScriptEngine) | 483 | if (m_scripts_enabled != !ScriptEngine) |
486 | { | 484 | { |
487 | // Tedd! Here's the method to disable the scripting engine! | 485 | // Tedd! Here's the method to disable the scripting engine! |
488 | MainLog.Instance.Verbose("TOTEDD", "Here is the method to trigger disabling of the scripting engine"); | 486 | m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine"); |
489 | } | 487 | } |
490 | if (m_physics_enabled != !PhysicsEngine) | 488 | if (m_physics_enabled != !PhysicsEngine) |
491 | { | 489 | { |
@@ -498,7 +496,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
498 | // This is the method that shuts down the scene. | 496 | // This is the method that shuts down the scene. |
499 | public override void Close() | 497 | public override void Close() |
500 | { | 498 | { |
501 | MainLog.Instance.Warn("SCENE", "Closing down the single simulator: " + RegionInfo.RegionName); | 499 | m_log.Warn("[SCENE]: Closing down the single simulator: " + RegionInfo.RegionName); |
502 | // Kick all ROOT agents with the message, 'The simulator is going down' | 500 | // Kick all ROOT agents with the message, 'The simulator is going down' |
503 | ForEachScenePresence(delegate(ScenePresence avatar) | 501 | ForEachScenePresence(delegate(ScenePresence avatar) |
504 | { | 502 | { |
@@ -543,7 +541,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
543 | /// </summary> | 541 | /// </summary> |
544 | public void StartTimer() | 542 | public void StartTimer() |
545 | { | 543 | { |
546 | MainLog.Instance.Debug("SCENE", "Starting timer"); | 544 | m_log.Debug("[SCENE]: Starting timer"); |
547 | m_heartbeatTimer.Enabled = true; | 545 | m_heartbeatTimer.Enabled = true; |
548 | m_heartbeatTimer.Interval = (int) (m_timespan*1000); | 546 | m_heartbeatTimer.Interval = (int) (m_timespan*1000); |
549 | m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); | 547 | m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); |
@@ -649,7 +647,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
649 | } | 647 | } |
650 | catch (Exception e) | 648 | catch (Exception e) |
651 | { | 649 | { |
652 | MainLog.Instance.Error("Scene", "Failed with exception " + e.ToString()); | 650 | m_log.Error("[Scene]: Failed with exception " + e.ToString()); |
653 | } | 651 | } |
654 | finally | 652 | finally |
655 | { | 653 | { |
@@ -848,7 +846,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
848 | { | 846 | { |
849 | if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile)) | 847 | if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile)) |
850 | { | 848 | { |
851 | MainLog.Instance.Verbose("TERRAIN", "No default terrain. Generating a new terrain."); | 849 | m_log.Info("[TERRAIN]: No default terrain. Generating a new terrain."); |
852 | Terrain.SetDefaultTerrain(); | 850 | Terrain.SetDefaultTerrain(); |
853 | 851 | ||
854 | m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); | 852 | m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); |
@@ -862,8 +860,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
862 | } | 860 | } |
863 | catch | 861 | catch |
864 | { | 862 | { |
865 | MainLog.Instance.Verbose("TERRAIN", | 863 | m_log.Info("[TERRAIN]: No terrain found in database or default. Generating a new terrain."); |
866 | "No terrain found in database or default. Generating a new terrain."); | ||
867 | Terrain.SetDefaultTerrain(); | 864 | Terrain.SetDefaultTerrain(); |
868 | } | 865 | } |
869 | m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); | 866 | m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); |
@@ -879,7 +876,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
879 | } | 876 | } |
880 | catch (Exception e) | 877 | catch (Exception e) |
881 | { | 878 | { |
882 | MainLog.Instance.Warn("terrain", "Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString()); | 879 | m_log.Warn("[terrain]: Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString()); |
883 | } | 880 | } |
884 | } | 881 | } |
885 | 882 | ||
@@ -894,12 +891,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
894 | { | 891 | { |
895 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") | 892 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") |
896 | { | 893 | { |
897 | MainLog.Instance.Verbose("GRID", "Grid is disabling forceful parcel banlists"); | 894 | m_log.Info("[GRID]: Grid is disabling forceful parcel banlists"); |
898 | m_LandManager.allowedForcefulBans = false; | 895 | m_LandManager.allowedForcefulBans = false; |
899 | } | 896 | } |
900 | else | 897 | else |
901 | { | 898 | { |
902 | MainLog.Instance.Verbose("GRID", "Grid is allowing forceful parcel banlists"); | 899 | m_log.Info("[GRID]: Grid is allowing forceful parcel banlists"); |
903 | m_LandManager.allowedForcefulBans = true; | 900 | m_LandManager.allowedForcefulBans = true; |
904 | } | 901 | } |
905 | } | 902 | } |
@@ -929,7 +926,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
929 | 926 | ||
930 | public void loadAllLandObjectsFromStorage() | 927 | public void loadAllLandObjectsFromStorage() |
931 | { | 928 | { |
932 | MainLog.Instance.Verbose("SCENE", "Loading land objects from storage"); | 929 | m_log.Info("[SCENE]: Loading land objects from storage"); |
933 | List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(RegionInfo.RegionID); | 930 | List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(RegionInfo.RegionID); |
934 | 931 | ||
935 | if (landData.Count == 0) | 932 | if (landData.Count == 0) |
@@ -951,7 +948,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
951 | /// </summary> | 948 | /// </summary> |
952 | public virtual void LoadPrimsFromStorage(bool m_permissions) | 949 | public virtual void LoadPrimsFromStorage(bool m_permissions) |
953 | { | 950 | { |
954 | MainLog.Instance.Verbose("SCENE", "Loading objects from datastore"); | 951 | m_log.Info("[SCENE]: Loading objects from datastore"); |
955 | 952 | ||
956 | List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID); | 953 | List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID); |
957 | foreach (SceneObjectGroup group in PrimsFromDB) | 954 | foreach (SceneObjectGroup group in PrimsFromDB) |
@@ -964,7 +961,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
964 | //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | 961 | //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); |
965 | } | 962 | } |
966 | 963 | ||
967 | MainLog.Instance.Verbose("SCENE", "Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); | 964 | m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); |
968 | } | 965 | } |
969 | 966 | ||
970 | 967 | ||
@@ -999,7 +996,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
999 | { | 996 | { |
1000 | pos = target.AbsolutePosition; | 997 | pos = target.AbsolutePosition; |
1001 | 998 | ||
1002 | //MainLog.Instance.Verbose("RAYTRACE", pos.ToString()); | 999 | //m_log.Info("[RAYTRACE]: " + pos.ToString()); |
1003 | //EntityIntersection rayTracing = null; | 1000 | //EntityIntersection rayTracing = null; |
1004 | //ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID)); | 1001 | //ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID)); |
1005 | //if (presence != null) | 1002 | //if (presence != null) |
@@ -1038,14 +1035,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1038 | 1035 | ||
1039 | //Vector3 RezPoint = Newpos; | 1036 | //Vector3 RezPoint = Newpos; |
1040 | 1037 | ||
1041 | //MainLog.Instance.Verbose("REZINFO", "Possible Rez Point:" + RezPoint.ToString()); | 1038 | //m_log.Info("[REZINFO]: Possible Rez Point:" + RezPoint.ToString()); |
1042 | //pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z); | 1039 | //pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z); |
1043 | //} | 1040 | //} |
1044 | 1041 | ||
1045 | |||
1046 | |||
1047 | |||
1048 | |||
1049 | return pos; | 1042 | return pos; |
1050 | } | 1043 | } |
1051 | else | 1044 | else |
@@ -1061,18 +1054,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1061 | pos = RayEnd; | 1054 | pos = RayEnd; |
1062 | return pos; | 1055 | return pos; |
1063 | } | 1056 | } |
1064 | |||
1065 | } | 1057 | } |
1066 | 1058 | ||
1067 | public virtual void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, | 1059 | public virtual void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, |
1068 | byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, | 1060 | byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, |
1069 | byte RayEndIsIntersection) | 1061 | byte RayEndIsIntersection) |
1070 | { | 1062 | { |
1071 | LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection); | 1063 | LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection); |
1072 | 1064 | ||
1073 | |||
1074 | |||
1075 | |||
1076 | if (PermissionsMngr.CanRezObject(ownerID, pos)) | 1065 | if (PermissionsMngr.CanRezObject(ownerID, pos)) |
1077 | { | 1066 | { |
1078 | // rez ON the ground, not IN the ground | 1067 | // rez ON the ground, not IN the ground |
@@ -1364,7 +1353,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1364 | } | 1353 | } |
1365 | catch (Exception e) | 1354 | catch (Exception e) |
1366 | { | 1355 | { |
1367 | MainLog.Instance.Error("Scene.cs:RemoveClient exception: " + e.ToString()); | 1356 | m_log.Error("Scene.cs:RemoveClient exception: " + e.ToString()); |
1368 | } | 1357 | } |
1369 | 1358 | ||
1370 | // Remove client agent from profile, so new logins will work | 1359 | // Remove client agent from profile, so new logins will work |
@@ -1474,7 +1463,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1474 | 1463 | ||
1475 | if (m_capsHandlers.ContainsKey(agent.AgentID)) | 1464 | if (m_capsHandlers.ContainsKey(agent.AgentID)) |
1476 | { | 1465 | { |
1477 | //MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " + | 1466 | //m_log.Warn("[client]: Adding duplicate CAPS entry for user " + |
1478 | // agent.AgentID.ToString()); | 1467 | // agent.AgentID.ToString()); |
1479 | try | 1468 | try |
1480 | { | 1469 | { |
@@ -1514,8 +1503,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1514 | } | 1503 | } |
1515 | catch (Exception e) | 1504 | catch (Exception e) |
1516 | { | 1505 | { |
1517 | MainLog.Instance.Verbose("SCENE", "Unable to do Agent Crossing."); | 1506 | m_log.Info("[SCENE]: Unable to do Agent Crossing."); |
1518 | MainLog.Instance.Debug("SCENE", e.ToString()); | 1507 | m_log.Debug("[SCENE]: " + e.ToString()); |
1519 | } | 1508 | } |
1520 | //m_innerScene.SwapRootChildAgent(false); | 1509 | //m_innerScene.SwapRootChildAgent(false); |
1521 | } | 1510 | } |
@@ -2158,14 +2147,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
2158 | switch (showWhat) | 2147 | switch (showWhat) |
2159 | { | 2148 | { |
2160 | case "users": | 2149 | case "users": |
2161 | MainLog.Instance.Error("Current Region: " + RegionInfo.RegionName); | 2150 | m_log.Error("Current Region: " + RegionInfo.RegionName); |
2162 | MainLog.Instance.Error( | 2151 | m_log.Error( |
2163 | String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname", | 2152 | String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname", |
2164 | "Agent ID", "Session ID", "Circuit", "IP", "World")); | 2153 | "Agent ID", "Session ID", "Circuit", "IP", "World")); |
2165 | 2154 | ||
2166 | foreach (ScenePresence scenePrescence in GetAvatars()) | 2155 | foreach (ScenePresence scenePrescence in GetAvatars()) |
2167 | { | 2156 | { |
2168 | MainLog.Instance.Error( | 2157 | m_log.Error( |
2169 | String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}", | 2158 | String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}", |
2170 | scenePrescence.Firstname, | 2159 | scenePrescence.Firstname, |
2171 | scenePrescence.Lastname, | 2160 | scenePrescence.Lastname, |
@@ -2177,12 +2166,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
2177 | } | 2166 | } |
2178 | break; | 2167 | break; |
2179 | case "modules": | 2168 | case "modules": |
2180 | MainLog.Instance.Error("The currently loaded modules in " + RegionInfo.RegionName + " are:"); | 2169 | m_log.Error("The currently loaded modules in " + RegionInfo.RegionName + " are:"); |
2181 | foreach (IRegionModule module in Modules.Values) | 2170 | foreach (IRegionModule module in Modules.Values) |
2182 | { | 2171 | { |
2183 | if (!module.IsSharedModule) | 2172 | if (!module.IsSharedModule) |
2184 | { | 2173 | { |
2185 | MainLog.Instance.Error("Region Module: " + module.Name); | 2174 | m_log.Error("Region Module: " + module.Name); |
2186 | } | 2175 | } |
2187 | } | 2176 | } |
2188 | break; | 2177 | break; |
@@ -2250,11 +2239,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2250 | /// | 2239 | /// |
2251 | /// </summary> | 2240 | /// </summary> |
2252 | /// <param name="scriptEngine"></param> | 2241 | /// <param name="scriptEngine"></param> |
2253 | /// <param name="logger"></param> | 2242 | public void AddScriptEngine(ScriptEngineInterface scriptEngine) |
2254 | public void AddScriptEngine(ScriptEngineInterface scriptEngine, LogBase logger) | ||
2255 | { | 2243 | { |
2256 | ScriptEngines.Add(scriptEngine); | 2244 | ScriptEngines.Add(scriptEngine); |
2257 | scriptEngine.InitializeEngine(this, logger); | 2245 | scriptEngine.InitializeEngine(this); |
2258 | } | 2246 | } |
2259 | 2247 | ||
2260 | public void TriggerObjectChanged(uint localID, uint change) | 2248 | public void TriggerObjectChanged(uint localID, uint change) |
@@ -2372,7 +2360,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2372 | } | 2360 | } |
2373 | catch (Exception e) | 2361 | catch (Exception e) |
2374 | { | 2362 | { |
2375 | MainLog.Instance.Verbose("BUG", e.ToString()); | 2363 | m_log.Info("[BUG]: " + e.ToString()); |
2376 | } | 2364 | } |
2377 | } | 2365 | } |
2378 | } | 2366 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index d4a4bb0..2e95322 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
36 | { | 36 | { |
37 | public abstract class SceneBase : IScene | 37 | public abstract class SceneBase : IScene |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | #region Events | 41 | #region Events |
40 | 42 | ||
41 | public event restart OnRestart; | 43 | public event restart OnRestart; |
@@ -155,7 +157,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
155 | /// <param name="seconds"></param> | 157 | /// <param name="seconds"></param> |
156 | public virtual void Restart(int seconds) | 158 | public virtual void Restart(int seconds) |
157 | { | 159 | { |
158 | MainLog.Instance.Error("REGION", "passing Restart Message up the namespace"); | 160 | m_log.Error("[REGION]: passing Restart Message up the namespace"); |
159 | OnRestart(RegionInfo); | 161 | OnRestart(RegionInfo); |
160 | } | 162 | } |
161 | 163 | ||
@@ -180,7 +182,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
180 | } | 182 | } |
181 | catch (Exception e) | 183 | catch (Exception e) |
182 | { | 184 | { |
183 | MainLog.Instance.Error("SCENE", "SceneBase.cs: Close() - Failed with exception " + e.ToString()); | 185 | m_log.Error("[SCENE]: SceneBase.cs: Close() - Failed with exception " + e.ToString()); |
184 | } | 186 | } |
185 | } | 187 | } |
186 | 188 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 2bb36a3..a89b52c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -40,6 +40,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
40 | 40 | ||
41 | public class SceneCommunicationService //one instance per region | 41 | public class SceneCommunicationService //one instance per region |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | protected CommunicationsManager m_commsProvider; | 45 | protected CommunicationsManager m_commsProvider; |
44 | protected RegionInfo m_regionInfo; | 46 | protected RegionInfo m_regionInfo; |
45 | 47 | ||
@@ -77,7 +79,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
77 | 79 | ||
78 | if (regionCommsHost != null) | 80 | if (regionCommsHost != null) |
79 | { | 81 | { |
80 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: registered with gridservice and got" + regionCommsHost.ToString()); | 82 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: registered with gridservice and got" + regionCommsHost.ToString()); |
81 | 83 | ||
82 | regionCommsHost.debugRegionName = _debugRegionName; | 84 | regionCommsHost.debugRegionName = _debugRegionName; |
83 | 85 | ||
@@ -91,7 +93,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
91 | } | 93 | } |
92 | else | 94 | else |
93 | { | 95 | { |
94 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: registered with gridservice and got null"); | 96 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: registered with gridservice and got null"); |
95 | } | 97 | } |
96 | } | 98 | } |
97 | 99 | ||
@@ -122,7 +124,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
122 | { | 124 | { |
123 | if (OnExpectUser != null) | 125 | if (OnExpectUser != null) |
124 | { | 126 | { |
125 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: OnExpectUser Fired for User:" + agent.firstname + " " + agent.lastname); | 127 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: OnExpectUser Fired for User:" + agent.firstname + " " + agent.lastname); |
126 | OnExpectUser(regionHandle, agent); | 128 | OnExpectUser(regionHandle, agent); |
127 | } | 129 | } |
128 | } | 130 | } |
@@ -131,7 +133,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
131 | { | 133 | { |
132 | if (OnRegionUp != null) | 134 | if (OnRegionUp != null) |
133 | { | 135 | { |
134 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: newRegionUp Fired for User:" + region.RegionName); | 136 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: newRegionUp Fired for User:" + region.RegionName); |
135 | OnRegionUp(region); | 137 | OnRegionUp(region); |
136 | } | 138 | } |
137 | return true; | 139 | return true; |
@@ -164,7 +166,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
164 | 166 | ||
165 | protected bool CloseConnection(ulong regionHandle, LLUUID agentID) | 167 | protected bool CloseConnection(ulong regionHandle, LLUUID agentID) |
166 | { | 168 | { |
167 | MainLog.Instance.Verbose("INTERREGION", "Incoming Agent Close Request for agent: " + agentID.ToString()); | 169 | m_log.Info("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID.ToString()); |
168 | 170 | ||
169 | if (OnCloseAgentConnection != null) | 171 | if (OnCloseAgentConnection != null) |
170 | { | 172 | { |
@@ -199,14 +201,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
199 | private void InformClientOfNeighbourAsync(ScenePresence avatar, AgentCircuitData a, ulong regionHandle, | 201 | private void InformClientOfNeighbourAsync(ScenePresence avatar, AgentCircuitData a, ulong regionHandle, |
200 | IPEndPoint endPoint) | 202 | IPEndPoint endPoint) |
201 | { | 203 | { |
202 | MainLog.Instance.Notice("INTERGRID", "Starting to inform client about neighbours"); | 204 | m_log.Info("[INTERGRID]: Starting to inform client about neighbours"); |
203 | bool regionAccepted = m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, a); | 205 | bool regionAccepted = m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, a); |
204 | 206 | ||
205 | if (regionAccepted) | 207 | if (regionAccepted) |
206 | { | 208 | { |
207 | avatar.ControllingClient.InformClientOfNeighbour(regionHandle, endPoint); | 209 | avatar.ControllingClient.InformClientOfNeighbour(regionHandle, endPoint); |
208 | avatar.AddNeighbourRegion(regionHandle); | 210 | avatar.AddNeighbourRegion(regionHandle); |
209 | MainLog.Instance.Notice("INTERGRID", "Completed inform client about neighbours"); | 211 | m_log.Info("[INTERGRID]: Completed inform client about neighbours"); |
210 | } | 212 | } |
211 | } | 213 | } |
212 | 214 | ||
@@ -291,17 +293,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
291 | 293 | ||
292 | private void InformNeighboursThatRegionIsUpAsync(RegionInfo region, ulong regionhandle) | 294 | private void InformNeighboursThatRegionIsUpAsync(RegionInfo region, ulong regionhandle) |
293 | { | 295 | { |
294 | MainLog.Instance.Notice("INTERGRID", "Starting to inform neighbors that I'm here"); | 296 | m_log.Info("[INTERGRID]: Starting to inform neighbors that I'm here"); |
295 | bool regionAccepted = | 297 | bool regionAccepted = |
296 | m_commsProvider.InterRegion.RegionUp((new SearializableRegionInfo(region)), regionhandle); | 298 | m_commsProvider.InterRegion.RegionUp((new SearializableRegionInfo(region)), regionhandle); |
297 | 299 | ||
298 | if (regionAccepted) | 300 | if (regionAccepted) |
299 | { | 301 | { |
300 | MainLog.Instance.Notice("INTERGRID", "Completed informing neighbors that I'm here"); | 302 | m_log.Info("[INTERGRID]: Completed informing neighbors that I'm here"); |
301 | } | 303 | } |
302 | else | 304 | else |
303 | { | 305 | { |
304 | MainLog.Instance.Notice("INTERGRID", "Failed to inform neighbors that I'm here"); | 306 | m_log.Info("[INTERGRID]: Failed to inform neighbors that I'm here"); |
305 | } | 307 | } |
306 | } | 308 | } |
307 | 309 | ||
@@ -311,7 +313,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
311 | /// </summary> | 313 | /// </summary> |
312 | public void InformNeighborsThatRegionisUp(RegionInfo region) | 314 | public void InformNeighborsThatRegionisUp(RegionInfo region) |
313 | { | 315 | { |
314 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); | 316 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); |
315 | 317 | ||
316 | 318 | ||
317 | List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>(); | 319 | List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>(); |
@@ -343,7 +345,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
343 | /// </summary> | 345 | /// </summary> |
344 | private void SendChildAgentDataUpdateAsync(ChildAgentDataUpdate cAgentData, ScenePresence presence) | 346 | private void SendChildAgentDataUpdateAsync(ChildAgentDataUpdate cAgentData, ScenePresence presence) |
345 | { | 347 | { |
346 | //MainLog.Instance.Notice("INTERGRID", "Informing neighbors about my agent."); | 348 | //m_log.Info("[INTERGRID]: Informing neighbors about my agent."); |
347 | try | 349 | try |
348 | { | 350 | { |
349 | foreach (ulong regionHandle in presence.KnownChildRegions) | 351 | foreach (ulong regionHandle in presence.KnownChildRegions) |
@@ -352,11 +354,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
352 | 354 | ||
353 | if (regionAccepted) | 355 | if (regionAccepted) |
354 | { | 356 | { |
355 | //MainLog.Instance.Notice("INTERGRID", "Completed sending a neighbor an update about my agent"); | 357 | //m_log.Info("[INTERGRID]: Completed sending a neighbor an update about my agent"); |
356 | } | 358 | } |
357 | else | 359 | else |
358 | { | 360 | { |
359 | //MainLog.Instance.Notice("INTERGRID", "Failed sending a neighbor an update about my agent"); | 361 | //m_log.Info("[INTERGRID]: Failed sending a neighbor an update about my agent"); |
360 | } | 362 | } |
361 | } | 363 | } |
362 | } | 364 | } |
@@ -397,12 +399,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
397 | 399 | ||
398 | if (regionAccepted) | 400 | if (regionAccepted) |
399 | { | 401 | { |
400 | MainLog.Instance.Notice("INTERGRID", "Completed sending agent Close agent Request to neighbor"); | 402 | m_log.Info("[INTERGRID]: Completed sending agent Close agent Request to neighbor"); |
401 | presence.RemoveNeighbourRegion(regionHandle); | 403 | presence.RemoveNeighbourRegion(regionHandle); |
402 | } | 404 | } |
403 | else | 405 | else |
404 | { | 406 | { |
405 | MainLog.Instance.Notice("INTERGRID", "Failed sending agent Close agent Request to neighbor"); | 407 | m_log.Info("[INTERGRID]: Failed sending agent Close agent Request to neighbor"); |
406 | 408 | ||
407 | } | 409 | } |
408 | 410 | ||
@@ -431,7 +433,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
431 | /// <returns></returns> | 433 | /// <returns></returns> |
432 | public virtual RegionInfo RequestNeighbouringRegionInfo(ulong regionHandle) | 434 | public virtual RegionInfo RequestNeighbouringRegionInfo(ulong regionHandle) |
433 | { | 435 | { |
434 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionHandle.ToString()); | 436 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionHandle.ToString()); |
435 | return m_commsProvider.GridService.RequestNeighbourInfo(regionHandle); | 437 | return m_commsProvider.GridService.RequestNeighbourInfo(regionHandle); |
436 | } | 438 | } |
437 | 439 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 1eac61b..7156428 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
38 | 38 | ||
39 | public class SceneManager | 39 | public class SceneManager |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | public event RestartSim OnRestartSim; | 43 | public event RestartSim OnRestartSim; |
42 | 44 | ||
43 | private readonly List<Scene> m_localScenes; | 45 | private readonly List<Scene> m_localScenes; |
@@ -98,8 +100,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
98 | 100 | ||
99 | public void HandleRestart(RegionInfo rdata) | 101 | public void HandleRestart(RegionInfo rdata) |
100 | { | 102 | { |
101 | MainLog.Instance.Error("SCENEMANAGER", | 103 | m_log.Error("[SCENEMANAGER]: Got Restart message for region:" + rdata.RegionName + " Sending up to main"); |
102 | "Got Restart message for region:" + rdata.RegionName + " Sending up to main"); | ||
103 | int RegionSceneElement = -1; | 104 | int RegionSceneElement = -1; |
104 | for (int i = 0; i < m_localScenes.Count; i++) | 105 | for (int i = 0; i < m_localScenes.Count; i++) |
105 | { | 106 | { |
@@ -146,7 +147,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
146 | } | 147 | } |
147 | else | 148 | else |
148 | { | 149 | { |
149 | MainLog.Instance.Error("REGION", "Unable to notify Other regions of this Region coming up"); | 150 | m_log.Error("[REGION]: Unable to notify Other regions of this Region coming up"); |
150 | } | 151 | } |
151 | } | 152 | } |
152 | 153 | ||
@@ -285,29 +286,29 @@ namespace OpenSim.Region.Environment.Scenes | |||
285 | return false; | 286 | return false; |
286 | } | 287 | } |
287 | 288 | ||
288 | public void SetDebugPacketOnCurrentScene(LogBase log, int newDebug) | 289 | public void SetDebugPacketOnCurrentScene(int newDebug) |
289 | { | 290 | { |
290 | ForEachCurrentScene(delegate(Scene scene) | 291 | ForEachCurrentScene(delegate(Scene scene) |
291 | { | 292 | { |
292 | List<EntityBase> EntitieList = scene.GetEntities(); | 293 | List<EntityBase> EntitieList = scene.GetEntities(); |
293 | 294 | ||
294 | foreach (EntityBase entity in EntitieList) | 295 | foreach (EntityBase entity in EntitieList) |
296 | { | ||
297 | if (entity is ScenePresence) | ||
295 | { | 298 | { |
296 | if (entity is ScenePresence) | 299 | ScenePresence scenePrescence = entity as ScenePresence; |
300 | if (!scenePrescence.IsChildAgent) | ||
297 | { | 301 | { |
298 | ScenePresence scenePrescence = entity as ScenePresence; | 302 | m_log.Error(String.Format("Packet debug for {0} {1} set to {2}", |
299 | if (!scenePrescence.IsChildAgent) | 303 | scenePrescence.Firstname, |
300 | { | 304 | scenePrescence.Lastname, |
301 | log.Error(String.Format("Packet debug for {0} {1} set to {2}", | 305 | newDebug)); |
302 | scenePrescence.Firstname, | ||
303 | scenePrescence.Lastname, | ||
304 | newDebug)); | ||
305 | 306 | ||
306 | scenePrescence.ControllingClient.SetDebug(newDebug); | 307 | scenePrescence.ControllingClient.SetDebug(newDebug); |
307 | } | ||
308 | } | 308 | } |
309 | } | 309 | } |
310 | }); | 310 | } |
311 | }); | ||
311 | } | 312 | } |
312 | 313 | ||
313 | public List<ScenePresence> GetCurrentSceneAvatars() | 314 | public List<ScenePresence> GetCurrentSceneAvatars() |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index 1bddf25..0956f74 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
38 | { | 38 | { |
39 | public partial class SceneObjectGroup : EntityBase | 39 | public partial class SceneObjectGroup : EntityBase |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | /// <summary> | 43 | /// <summary> |
42 | /// Start a given script. | 44 | /// Start a given script. |
43 | /// </summary> | 45 | /// </summary> |
@@ -53,10 +55,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
53 | } | 55 | } |
54 | else | 56 | else |
55 | { | 57 | { |
56 | MainLog.Instance.Error( | 58 | m_log.Error(String.Format( |
57 | "PRIMINVENTORY", | 59 | "[PRIMINVENTORY]: " + |
58 | "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", | 60 | "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", |
59 | localID, Name, UUID, itemID); | 61 | localID, Name, UUID, itemID)); |
60 | } | 62 | } |
61 | } | 63 | } |
62 | 64 | ||
@@ -74,10 +76,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
74 | // } | 76 | // } |
75 | // else | 77 | // else |
76 | // { | 78 | // { |
77 | // MainLog.Instance.Error( | 79 | // m_log.Error(String.Format( |
78 | // "PRIMINVENTORY", | 80 | // "[PRIMINVENTORY]: " + |
79 | // "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", | 81 | // "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", |
80 | // localID, Name, UUID, itemID); | 82 | // localID, Name, UUID, itemID)); |
81 | // } | 83 | // } |
82 | // } | 84 | // } |
83 | 85 | ||
@@ -106,10 +108,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
106 | } | 108 | } |
107 | else | 109 | else |
108 | { | 110 | { |
109 | MainLog.Instance.Error( | 111 | m_log.Error(String.Format( |
110 | "PRIMINVENTORY", | 112 | "[PRIMINVENTORY]: " + |
111 | "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", | 113 | "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", |
112 | partID, Name, UUID, itemID); | 114 | partID, Name, UUID, itemID)); |
113 | } | 115 | } |
114 | } | 116 | } |
115 | 117 | ||
@@ -127,10 +129,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
127 | } | 129 | } |
128 | else | 130 | else |
129 | { | 131 | { |
130 | MainLog.Instance.Error( | 132 | m_log.Error(String.Format( |
131 | "PRIMINVENTORY", | 133 | "[PRIMINVENTORY]: " + |
132 | "Couldn't find part {0} in object group {1}, {2} to retreive prim inventory", | 134 | "Couldn't find part {0} in object group {1}, {2} to retreive prim inventory", |
133 | localID, Name, UUID); | 135 | localID, Name, UUID)); |
134 | } | 136 | } |
135 | return false; | 137 | return false; |
136 | } | 138 | } |
@@ -144,10 +146,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
144 | } | 146 | } |
145 | else | 147 | else |
146 | { | 148 | { |
147 | MainLog.Instance.Error( | 149 | m_log.Error(String.Format( |
148 | "PRIMINVENTORY", | 150 | "[PRIMINVENTORY]: " + |
149 | "Couldn't find part {0} in object group {1}, {2} to request inventory data", | 151 | "Couldn't find part {0} in object group {1}, {2} to request inventory data", |
150 | localID, Name, UUID); | 152 | localID, Name, UUID)); |
151 | } | 153 | } |
152 | } | 154 | } |
153 | 155 | ||
@@ -183,10 +185,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
183 | } | 185 | } |
184 | else | 186 | else |
185 | { | 187 | { |
186 | MainLog.Instance.Error( | 188 | m_log.Error(String.Format( |
187 | "PRIMINVENTORY", | 189 | "[PRIMINVENTORY]: " + |
188 | "Couldn't find prim local ID {0} in group {1}, {2} to add inventory item ID {3}", | 190 | "Couldn't find prim local ID {0} in group {1}, {2} to add inventory item ID {3}", |
189 | localID, Name, UUID, newItemId); | 191 | localID, Name, UUID, newItemId)); |
190 | } | 192 | } |
191 | 193 | ||
192 | return false; | 194 | return false; |
@@ -207,10 +209,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
207 | } | 209 | } |
208 | else | 210 | else |
209 | { | 211 | { |
210 | MainLog.Instance.Error( | 212 | m_log.Error(String.Format( |
211 | "PRIMINVENTORY", | 213 | "[PRIMINVENTORY]: " + |
212 | "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", | 214 | "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", |
213 | primID, part.Name, part.UUID, itemID); | 215 | primID, part.Name, part.UUID, itemID)); |
214 | } | 216 | } |
215 | 217 | ||
216 | return null; | 218 | return null; |
@@ -233,10 +235,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
233 | } | 235 | } |
234 | else | 236 | else |
235 | { | 237 | { |
236 | MainLog.Instance.Error( | 238 | m_log.Error(String.Format( |
237 | "PRIMINVENTORY", | 239 | "[PRIMINVENTORY]: " + |
238 | "Couldn't find prim ID {0} to update item {1}, {2}", | 240 | "Couldn't find prim ID {0} to update item {1}, {2}", |
239 | item.ParentPartID, item.Name, item.ItemID); | 241 | item.ParentPartID, item.Name, item.ItemID)); |
240 | } | 242 | } |
241 | 243 | ||
242 | return false; | 244 | return false; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 10395b6..4fe7b55 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1003,9 +1003,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1003 | } | 1003 | } |
1004 | else | 1004 | else |
1005 | { | 1005 | { |
1006 | MainLog.Instance.Verbose("SCENE", | 1006 | m_log.Info(String.Format("[SCENE]: " + |
1007 | "DelinkFromGroup(): Child prim local id {0} not found in object with root prim id {1}", | 1007 | "DelinkFromGroup(): Child prim local id {0} not found in object with root prim id {1}", |
1008 | partID, LocalId); | 1008 | partID, LocalId)); |
1009 | } | 1009 | } |
1010 | } | 1010 | } |
1011 | 1011 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index d4e2102..d9ee94c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -41,6 +41,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
41 | { | 41 | { |
42 | public partial class SceneObjectPart : IScriptHost | 42 | public partial class SceneObjectPart : IScriptHost |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
44 | private string m_inventoryFileName = String.Empty; | 46 | private string m_inventoryFileName = String.Empty; |
45 | 47 | ||
46 | /// <summary> | 48 | /// <summary> |
@@ -131,10 +133,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
131 | /// <returns></returns> | 133 | /// <returns></returns> |
132 | public void StartScript(TaskInventoryItem item) | 134 | public void StartScript(TaskInventoryItem item) |
133 | { | 135 | { |
134 | // MainLog.Instance.Verbose( | 136 | // m_log.Info(String.Format( |
135 | // "PRIMINVENTORY", | 137 | // "[PRIMINVENTORY]: " + |
136 | // "Starting script {0}, {1} in prim {2}, {3}", | 138 | // "Starting script {0}, {1} in prim {2}, {3}", |
137 | // item.Name, item.ItemID, Name, UUID); | 139 | // item.Name, item.ItemID, Name, UUID)); |
138 | 140 | ||
139 | AssetBase rezAsset = m_parentGroup.Scene.AssetCache.GetAsset(item.AssetID, false); | 141 | AssetBase rezAsset = m_parentGroup.Scene.AssetCache.GetAsset(item.AssetID, false); |
140 | 142 | ||
@@ -145,10 +147,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
145 | } | 147 | } |
146 | else | 148 | else |
147 | { | 149 | { |
148 | MainLog.Instance.Error( | 150 | m_log.Error(String.Format( |
149 | "PRIMINVENTORY", | 151 | "[PRIMINVENTORY]: " + |
150 | "Couldn't start script {0}, {1} since asset ID {2} could not be found", | 152 | "Couldn't start script {0}, {1} since asset ID {2} could not be found", |
151 | item.Name, item.ItemID, item.AssetID); | 153 | item.Name, item.ItemID, item.AssetID)); |
152 | } | 154 | } |
153 | } | 155 | } |
154 | 156 | ||
@@ -168,10 +170,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
168 | } | 170 | } |
169 | else | 171 | else |
170 | { | 172 | { |
171 | MainLog.Instance.Error( | 173 | m_log.Error(String.Format( |
172 | "PRIMINVENTORY", | 174 | "[PRIMINVENTORY]: " + |
173 | "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2}", | 175 | "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2}", |
174 | itemId, Name, UUID); | 176 | itemId, Name, UUID)); |
175 | } | 177 | } |
176 | } | 178 | } |
177 | } | 179 | } |
@@ -188,10 +190,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
188 | } | 190 | } |
189 | else | 191 | else |
190 | { | 192 | { |
191 | MainLog.Instance.Error( | 193 | m_log.Error(String.Format( |
192 | "PRIMINVENTORY", | 194 | "[PRIMINVENTORY]: " + |
193 | "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}", | 195 | "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}", |
194 | itemId, Name, UUID); | 196 | itemId, Name, UUID)); |
195 | } | 197 | } |
196 | } | 198 | } |
197 | 199 | ||
@@ -251,10 +253,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
251 | } | 253 | } |
252 | else | 254 | else |
253 | { | 255 | { |
254 | MainLog.Instance.Error( | 256 | m_log.Error(String.Format( |
255 | "PRIMINVENTORY", | 257 | "[PRIMINVENTORY]: " + |
256 | "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", | 258 | "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", |
257 | itemID, Name, UUID); | 259 | itemID, Name, UUID)); |
258 | } | 260 | } |
259 | } | 261 | } |
260 | 262 | ||
@@ -283,10 +285,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
283 | } | 285 | } |
284 | else | 286 | else |
285 | { | 287 | { |
286 | MainLog.Instance.Error( | 288 | m_log.Error(String.Format( |
287 | "PRIMINVENTORY", | 289 | "[PRIMINVENTORY]: " + |
288 | "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", | 290 | "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", |
289 | item.ItemID, Name, UUID); | 291 | item.ItemID, Name, UUID)); |
290 | } | 292 | } |
291 | } | 293 | } |
292 | 294 | ||
@@ -316,10 +318,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
316 | } | 318 | } |
317 | else | 319 | else |
318 | { | 320 | { |
319 | MainLog.Instance.Error( | 321 | m_log.Error(String.Format( |
320 | "PRIMINVENTORY", | 322 | "[PRIMINVENTORY]: " + |
321 | "Tried to remove item ID {0} from prim {1}, {2} but the item does not exist in this inventory", | 323 | "Tried to remove item ID {0} from prim {1}, {2} but the item does not exist in this inventory", |
322 | itemID, Name, UUID); | 324 | itemID, Name, UUID)); |
323 | } | 325 | } |
324 | } | 326 | } |
325 | 327 | ||
@@ -384,8 +386,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
384 | 386 | ||
385 | fileData = Helpers.StringToField(invString.BuildString); | 387 | fileData = Helpers.StringToField(invString.BuildString); |
386 | 388 | ||
387 | // MainLog.Instance.Verbose( | 389 | // m_log.Info(String.Format( |
388 | // "PRIMINVENTORY", "RequestInventoryFile fileData: {0}", Helpers.FieldToUTF8String(fileData)); | 390 | // "[PRIMINVENTORY]: RequestInventoryFile fileData: {0}", Helpers.FieldToUTF8String(fileData))); |
389 | 391 | ||
390 | if (fileData.Length > 2) | 392 | if (fileData.Length > 2) |
391 | { | 393 | { |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 0ba64f2..4456fce 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -306,7 +306,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
306 | { | 306 | { |
307 | // Ignore, and skip over. | 307 | // Ignore, and skip over. |
308 | } | 308 | } |
309 | //MainLog.Instance.Verbose("PART", "OFFSET:" + m_offsetPosition, ToString()); | 309 | //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString()); |
310 | } | 310 | } |
311 | } | 311 | } |
312 | 312 | ||
@@ -347,14 +347,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
347 | if (ParentID == 0) | 347 | if (ParentID == 0) |
348 | { | 348 | { |
349 | PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z); | 349 | PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z); |
350 | //MainLog.Instance.Verbose("PART", "RO1:" + PhysActor.Orientation.ToString()); | 350 | //m_log.Info("[PART]: RO1:" + PhysActor.Orientation.ToString()); |
351 | } | 351 | } |
352 | else | 352 | else |
353 | { | 353 | { |
354 | // Child prim we have to calculate it's world rotationwel | 354 | // Child prim we have to calculate it's world rotationwel |
355 | LLQuaternion resultingrotation = GetWorldRotation(); | 355 | LLQuaternion resultingrotation = GetWorldRotation(); |
356 | PhysActor.Orientation = new Quaternion(resultingrotation.W, resultingrotation.X, resultingrotation.Y, resultingrotation.Z); | 356 | PhysActor.Orientation = new Quaternion(resultingrotation.W, resultingrotation.X, resultingrotation.Y, resultingrotation.Z); |
357 | //MainLog.Instance.Verbose("PART", "RO2:" + PhysActor.Orientation.ToString()); | 357 | //m_log.Info("[PART]: RO2:" + PhysActor.Orientation.ToString()); |
358 | } | 358 | } |
359 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); | 359 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); |
360 | //} | 360 | //} |
@@ -1554,14 +1554,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1554 | // Are we the owner? | 1554 | // Are we the owner? |
1555 | if (AgentID == OwnerID) | 1555 | if (AgentID == OwnerID) |
1556 | { | 1556 | { |
1557 | MainLog.Instance.Verbose("PERMISSIONS", | 1557 | m_log.Info("[PERMISSIONS]: field: " + field.ToString() + ", mask: " + mask.ToString() + " addRemTF: " + |
1558 | "field: " + field.ToString() + ", mask: " + mask.ToString() + " addRemTF: " + | 1558 | addRemTF.ToString()); |
1559 | addRemTF.ToString()); | ||
1560 | 1559 | ||
1561 | //Field 8 = EveryoneMask | 1560 | //Field 8 = EveryoneMask |
1562 | if (field == (byte) 8) | 1561 | if (field == (byte) 8) |
1563 | { | 1562 | { |
1564 | MainLog.Instance.Verbose("PERMISSIONS", "Left over: " + (OwnerMask - EveryoneMask)); | 1563 | m_log.Info("[PERMISSIONS]: Left over: " + (OwnerMask - EveryoneMask)); |
1565 | if (addRemTF == (byte) 0) | 1564 | if (addRemTF == (byte) 0) |
1566 | { | 1565 | { |
1567 | //EveryoneMask = (uint)0; | 1566 | //EveryoneMask = (uint)0; |
@@ -1751,7 +1750,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1751 | 1750 | ||
1752 | public void PhysicsOutOfBounds(PhysicsVector pos) | 1751 | public void PhysicsOutOfBounds(PhysicsVector pos) |
1753 | { | 1752 | { |
1754 | MainLog.Instance.Verbose("PHYSICS", "Physical Object went out of bounds."); | 1753 | m_log.Info("[PHYSICS]: Physical Object went out of bounds."); |
1755 | RemFlag(LLObject.ObjectFlags.Physics); | 1754 | RemFlag(LLObject.ObjectFlags.Physics); |
1756 | DoPhysicsPropertyUpdate(false, true); | 1755 | DoPhysicsPropertyUpdate(false, true); |
1757 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); | 1756 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 659a1f5..5c33dfc 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
39 | { | 39 | { |
40 | public class ScenePresence : EntityBase | 40 | public class ScenePresence : EntityBase |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | public static AvatarAnimations Animations; | 44 | public static AvatarAnimations Animations; |
43 | public static byte[] DefaultTexture; | 45 | public static byte[] DefaultTexture; |
44 | public LLUUID currentParcelUUID = LLUUID.Zero; | 46 | public LLUUID currentParcelUUID = LLUUID.Zero; |
@@ -345,7 +347,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
345 | } | 347 | } |
346 | catch (KeyNotFoundException) | 348 | catch (KeyNotFoundException) |
347 | { | 349 | { |
348 | MainLog.Instance.Warn("AVATAR", "KeyNotFound Exception playing avatar stand animation"); | 350 | m_log.Warn("[AVATAR]: KeyNotFound Exception playing avatar stand animation"); |
349 | } | 351 | } |
350 | m_animationSeqs.Add(1); | 352 | m_animationSeqs.Add(1); |
351 | 353 | ||
@@ -933,7 +935,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
933 | } | 935 | } |
934 | else | 936 | else |
935 | { | 937 | { |
936 | MainLog.Instance.Warn("Sit requested on unknown object: " + targetID.ToString()); | 938 | m_log.Warn("Sit requested on unknown object: " + targetID.ToString()); |
937 | } | 939 | } |
938 | SendSitResponse(remoteClient, targetID, offset); | 940 | SendSitResponse(remoteClient, targetID, offset); |
939 | } | 941 | } |
@@ -1047,7 +1049,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1047 | } | 1049 | } |
1048 | catch | 1050 | catch |
1049 | { | 1051 | { |
1050 | MainLog.Instance.Warn("AVATAR", "SetMovementAnimation for avatar failed. Attempting recovery..."); | 1052 | m_log.Warn("[AVATAR]: SetMovementAnimation for avatar failed. Attempting recovery..."); |
1051 | m_animations[0] = anim; | 1053 | m_animations[0] = anim; |
1052 | m_animationSeqs[0] = seq; | 1054 | m_animationSeqs[0] = seq; |
1053 | SendAnimPack(); | 1055 | SendAnimPack(); |
@@ -1184,13 +1186,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1184 | //bool controlland = (((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); | 1186 | //bool controlland = (((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); |
1185 | //bool colliding = (m_physicsActor.IsColliding==true); | 1187 | //bool colliding = (m_physicsActor.IsColliding==true); |
1186 | //if (controlland) | 1188 | //if (controlland) |
1187 | // MainLog.Instance.Verbose("AGENT","landCommand"); | 1189 | // m_log.Info("[AGENT]: landCommand"); |
1188 | //if (colliding ) | 1190 | //if (colliding ) |
1189 | // MainLog.Instance.Verbose("AGENT","colliding"); | 1191 | // m_log.Info("[AGENT]: colliding"); |
1190 | //if (m_physicsActor.Flying && colliding && controlland) | 1192 | //if (m_physicsActor.Flying && colliding && controlland) |
1191 | //{ | 1193 | //{ |
1192 | // StopFlying(); | 1194 | // StopFlying(); |
1193 | // MainLog.Instance.Verbose("AGENT", "Stop FLying"); | 1195 | // m_log.Info("[AGENT]: Stop FLying"); |
1194 | //} | 1196 | //} |
1195 | } | 1197 | } |
1196 | else | 1198 | else |
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs index d781806..5d432f5 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs | |||
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
33 | { | 33 | { |
34 | public interface ScriptEngineInterface | 34 | public interface ScriptEngineInterface |
35 | { | 35 | { |
36 | void InitializeEngine(Scene Sceneworld, LogBase logger); | 36 | void InitializeEngine(Scene Sceneworld); |
37 | void Shutdown(); | 37 | void Shutdown(); |
38 | // void StartScript(string ScriptID, IScriptHost ObjectID); | 38 | // void StartScript(string ScriptID, IScriptHost ObjectID); |
39 | } | 39 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs index 74f9358..b52b2e9 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs | |||
@@ -35,12 +35,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
35 | { | 35 | { |
36 | public class ScriptEngineLoader | 36 | public class ScriptEngineLoader |
37 | { | 37 | { |
38 | private LogBase m_log; | 38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
39 | |||
40 | public ScriptEngineLoader(LogBase logger) | ||
41 | { | ||
42 | m_log = logger; | ||
43 | } | ||
44 | 39 | ||
45 | public ScriptEngineInterface LoadScriptEngine(string EngineName) | 40 | public ScriptEngineInterface LoadScriptEngine(string EngineName) |
46 | { | 41 | { |
@@ -54,7 +49,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
54 | } | 49 | } |
55 | catch (Exception e) | 50 | catch (Exception e) |
56 | { | 51 | { |
57 | m_log.Error("ScriptEngine", | 52 | m_log.Error("[ScriptEngine]: " + |
58 | "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + | 53 | "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + |
59 | e.StackTrace.ToString()); | 54 | e.StackTrace.ToString()); |
60 | } | 55 | } |
@@ -88,7 +83,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
88 | //} | 83 | //} |
89 | //catch (Exception e) | 84 | //catch (Exception e) |
90 | //{ | 85 | //{ |
91 | // m_log.Error("ScriptEngine", "Error loading assembly \String.Empty + FileName + "\": " + e.ToString()); | 86 | // m_log.Error("[ScriptEngine]: Error loading assembly \String.Empty + FileName + "\": " + e.ToString()); |
92 | //} | 87 | //} |
93 | 88 | ||
94 | 89 | ||
@@ -105,7 +100,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
105 | //} | 100 | //} |
106 | //catch (Exception e) | 101 | //catch (Exception e) |
107 | //{ | 102 | //{ |
108 | // m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); | 103 | // m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); |
109 | //} | 104 | //} |
110 | 105 | ||
111 | ScriptEngineInterface ret; | 106 | ScriptEngineInterface ret; |
@@ -115,7 +110,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
115 | //} | 110 | //} |
116 | //catch (Exception e) | 111 | //catch (Exception e) |
117 | //{ | 112 | //{ |
118 | // m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); | 113 | // m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); |
119 | //} | 114 | //} |
120 | 115 | ||
121 | return ret; | 116 | return ret; |
diff --git a/OpenSim/Region/Environment/StorageManager.cs b/OpenSim/Region/Environment/StorageManager.cs index 1c41373..f15bbdb 100644 --- a/OpenSim/Region/Environment/StorageManager.cs +++ b/OpenSim/Region/Environment/StorageManager.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.Environment | |||
35 | { | 35 | { |
36 | public class StorageManager | 36 | public class StorageManager |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | private IRegionDataStore m_dataStore; | 40 | private IRegionDataStore m_dataStore; |
39 | 41 | ||
40 | public IRegionDataStore DataStore | 42 | public IRegionDataStore DataStore |
@@ -49,7 +51,7 @@ namespace OpenSim.Region.Environment | |||
49 | 51 | ||
50 | public StorageManager(string dllName, string connectionstring, bool persistPrimInventories) | 52 | public StorageManager(string dllName, string connectionstring, bool persistPrimInventories) |
51 | { | 53 | { |
52 | MainLog.Instance.Verbose("DATASTORE", "Attempting to load " + dllName); | 54 | m_log.Info("[DATASTORE]: Attempting to load " + dllName); |
53 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | 55 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); |
54 | 56 | ||
55 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 57 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
@@ -66,7 +68,7 @@ namespace OpenSim.Region.Environment | |||
66 | 68 | ||
67 | m_dataStore = plug; | 69 | m_dataStore = plug; |
68 | 70 | ||
69 | MainLog.Instance.Verbose("DATASTORE", "Added IRegionDataStore Interface"); | 71 | m_log.Info("[DATASTORE]: Added IRegionDataStore Interface"); |
70 | } | 72 | } |
71 | } | 73 | } |
72 | } | 74 | } |