varregion: Debug messages for region crossing debugging.

varregion
Robert Adams 2014-01-11 22:00:24 -08:00
parent 3760d10cd0
commit 1eea6fd452
2 changed files with 23 additions and 12 deletions

View File

@ -59,6 +59,7 @@ namespace OpenSim.Region.ClientStack.Linden
public class EventQueueGetModule : IEventQueue, INonSharedRegionModule public class EventQueueGetModule : IEventQueue, INonSharedRegionModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static string LogHeader = "[EVENT QUEUE GET MODULE]";
/// <value> /// <value>
/// Debug level. /// Debug level.
@ -714,7 +715,7 @@ namespace OpenSim.Region.ClientStack.Linden
public virtual void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY) public virtual void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY)
{ {
m_log.DebugFormat("{0} EnableSimulator. handle={1}, avatarID={2}, regionSize={3},{4}>", m_log.DebugFormat("{0} EnableSimulator. handle={1}, avatarID={2}, regionSize={3},{4}>",
"[EVENT QUEUE GET MODULE]", handle, avatarID, regionSizeX, regionSizeY); LogHeader, handle, avatarID, regionSizeX, regionSizeY);
OSD item = EventQueueHelper.EnableSimulator(handle, endPoint, regionSizeX, regionSizeY); OSD item = EventQueueHelper.EnableSimulator(handle, endPoint, regionSizeX, regionSizeY);
Enqueue(item, avatarID); Enqueue(item, avatarID);
@ -724,7 +725,7 @@ namespace OpenSim.Region.ClientStack.Linden
ulong regionHandle, int regionSizeX, int regionSizeY) ulong regionHandle, int regionSizeX, int regionSizeY)
{ {
m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, avatarID={2}, regionSize={3},{4}>", m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, avatarID={2}, regionSize={3},{4}>",
"[EVENT QUEUE GET MODULE]", regionHandle, avatarID, regionSizeX, regionSizeY); LogHeader, regionHandle, avatarID, regionSizeX, regionSizeY);
OSD item = EventQueueHelper.EstablishAgentCommunication(avatarID, endPoint.ToString(), capsPath, regionHandle, regionSizeX, regionSizeY); OSD item = EventQueueHelper.EstablishAgentCommunication(avatarID, endPoint.ToString(), capsPath, regionHandle, regionSizeX, regionSizeY);
Enqueue(item, avatarID); Enqueue(item, avatarID);
} }
@ -734,8 +735,8 @@ namespace OpenSim.Region.ClientStack.Linden
uint locationID, uint flags, string capsURL, uint locationID, uint flags, string capsURL,
UUID avatarID, int regionSizeX, int regionSizeY) UUID avatarID, int regionSizeX, int regionSizeY)
{ {
m_log.DebugFormat("{0} TeleportFinishEvent. handle={1}, avatarID={2}, regionSize={3},{4}>", m_log.DebugFormat("{0} TeleportFinishEvent. handle={1}, avatarID={2}, regionSize=<{3},{4}>",
"[EVENT QUEUE GET MODULE]", regionHandle, avatarID, regionSizeX, regionSizeY); LogHeader, regionHandle, avatarID, regionSizeX, regionSizeY);
OSD item = EventQueueHelper.TeleportFinishEvent(regionHandle, simAccess, regionExternalEndPoint, OSD item = EventQueueHelper.TeleportFinishEvent(regionHandle, simAccess, regionExternalEndPoint,
locationID, flags, capsURL, avatarID, regionSizeX, regionSizeY); locationID, flags, capsURL, avatarID, regionSizeX, regionSizeY);
@ -747,7 +748,7 @@ namespace OpenSim.Region.ClientStack.Linden
string capsURL, UUID avatarID, UUID sessionID, int regionSizeX, int regionSizeY) string capsURL, UUID avatarID, UUID sessionID, int regionSizeX, int regionSizeY)
{ {
m_log.DebugFormat("{0} CrossRegion. handle={1}, avatarID={2}, regionSize={3},{4}>", m_log.DebugFormat("{0} CrossRegion. handle={1}, avatarID={2}, regionSize={3},{4}>",
"[EVENT QUEUE GET MODULE]", handle, avatarID, regionSizeX, regionSizeY); LogHeader, handle, avatarID, regionSizeX, regionSizeY);
OSD item = EventQueueHelper.CrossRegion(handle, pos, lookAt, newRegionExternalEndPoint, OSD item = EventQueueHelper.CrossRegion(handle, pos, lookAt, newRegionExternalEndPoint,
capsURL, avatarID, sessionID, regionSizeX, regionSizeY); capsURL, avatarID, sessionID, regionSizeX, regionSizeY);

View File

@ -48,6 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
private static readonly ILog m_log = private static readonly ILog m_log =
LogManager.GetLogger( LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType); MethodBase.GetCurrentMethod().DeclaringType);
private static string LogHeader = "[LOCAL GRID SERVICE CONNECTOR]";
private IGridService m_GridService; private IGridService m_GridService;
private Dictionary<UUID, RegionCache> m_LocalCache = new Dictionary<UUID, RegionCache>(); private Dictionary<UUID, RegionCache> m_LocalCache = new Dictionary<UUID, RegionCache>();
@ -56,12 +57,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
public LocalGridServicesConnector() public LocalGridServicesConnector()
{ {
m_log.Debug("[LOCAL GRID SERVICE CONNECTOR]: LocalGridServicesConnector no parms."); m_log.DebugFormat("{0} LocalGridServicesConnector no parms.", LogHeader);
} }
public LocalGridServicesConnector(IConfigSource source) public LocalGridServicesConnector(IConfigSource source)
{ {
m_log.Debug("[LOCAL GRID SERVICE CONNECTOR]: LocalGridServicesConnector instantiated directly."); m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader);
InitialiseService(source); InitialiseService(source);
} }
@ -197,7 +198,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
// be the base coordinate of the region. // be the base coordinate of the region.
public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
{ {
m_log.DebugFormat("{0} GetRegionByPosition. pos=<{1},{2}>", "[LOCAL GRID SERVICE CONNECTOR", x, y);
GridRegion region = null; GridRegion region = null;
// First see if it's a neighbour, even if it isn't on this sim. // First see if it's a neighbour, even if it isn't on this sim.
@ -210,15 +210,25 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
region = rcache.GetRegionByPosition(x, y); region = rcache.GetRegionByPosition(x, y);
if (region != null) if (region != null)
{ {
m_log.DebugFormat("{0} GetRegionByPosition. Found region {1}. Pos=<{2},{3}>", // m_log.DebugFormat("{0} GetRegionByPosition. Found region {1} in cache. Pos=<{2},{3}>",
"[LOCAL GRID SERVICE CONNECTOR", region.RegionName, x, y); // LogHeader, region.RegionName, x, y);
return region; break;
} }
} }
} }
// Then try on this sim (may be a lookup in DB if this is using MySql). // Then try on this sim (may be a lookup in DB if this is using MySql).
return m_GridService.GetRegionByPosition(scopeID, x, y); if (region == null)
{
region = m_GridService.GetRegionByPosition(scopeID, x, y);
if (region == null)
m_log.DebugFormat("{0} GetRegionByPosition. Region not found by grid service. Pos=<{1},{2}>",
LogHeader, x, y);
else
m_log.DebugFormat("{0} GetRegionByPosition. Requested region {1} from grid service. Pos=<{2},{3}>",
LogHeader, region.RegionName, x, y);
}
return region;
} }
public GridRegion GetRegionByName(UUID scopeID, string regionName) public GridRegion GetRegionByName(UUID scopeID, string regionName)