diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
14 files changed, 242 insertions, 244 deletions
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; |