minor: add client name to various login service log messages to disambiguate messages from concurrent logins. Also adds destination resolution debug log message showing region endpoint.

Adding endpoint to the log helps to find issues where the region external host information has been wrongly configured
0.7.4.1
Justin Clark-Casey (justincc) 2012-07-05 21:30:20 +01:00
parent 8674604ff5
commit db9616f7ba
1 changed files with 43 additions and 13 deletions

View File

@ -257,7 +257,9 @@ namespace OpenSim.Services.LLLoginService
if (!am.Success) if (!am.Success)
{ {
m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: client {0} is not allowed", clientVersion); m_log.InfoFormat(
"[LLOGIN SERVICE]: Login failed for {0} {1}, reason: client {2} is not allowed",
firstName, lastName, clientVersion);
return LLFailedLoginResponse.LoginBlockedProblem; return LLFailedLoginResponse.LoginBlockedProblem;
} }
} }
@ -269,7 +271,9 @@ namespace OpenSim.Services.LLLoginService
if (dm.Success) if (dm.Success)
{ {
m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: client {0} is denied", clientVersion); m_log.InfoFormat(
"[LLOGIN SERVICE]: Login failed for {0} {1}, reason: client {2} is denied",
firstName, lastName, clientVersion);
return LLFailedLoginResponse.LoginBlockedProblem; return LLFailedLoginResponse.LoginBlockedProblem;
} }
} }
@ -280,13 +284,16 @@ namespace OpenSim.Services.LLLoginService
UserAccount account = m_UserAccountService.GetUserAccount(scopeID, firstName, lastName); UserAccount account = m_UserAccountService.GetUserAccount(scopeID, firstName, lastName);
if (account == null) if (account == null)
{ {
m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: user not found"); m_log.InfoFormat(
"[LLOGIN SERVICE]: Login failed for {0} {1}, reason: user not found", firstName, lastName);
return LLFailedLoginResponse.UserProblem; return LLFailedLoginResponse.UserProblem;
} }
if (account.UserLevel < m_MinLoginLevel) if (account.UserLevel < m_MinLoginLevel)
{ {
m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: login is blocked for user level {0}", account.UserLevel); m_log.InfoFormat(
"[LLOGIN SERVICE]: Login failed for {0} {1}, reason: user level is {2} but minimum login level is {3}",
firstName, lastName, m_MinLoginLevel, account.UserLevel);
return LLFailedLoginResponse.LoginBlockedProblem; return LLFailedLoginResponse.LoginBlockedProblem;
} }
@ -297,7 +304,8 @@ namespace OpenSim.Services.LLLoginService
{ {
if (account.ScopeID != scopeID && account.ScopeID != UUID.Zero) if (account.ScopeID != scopeID && account.ScopeID != UUID.Zero)
{ {
m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: user not found"); m_log.InfoFormat(
"[LLOGIN SERVICE]: Login failed, reason: user {0} {1} not found", firstName, lastName);
return LLFailedLoginResponse.UserProblem; return LLFailedLoginResponse.UserProblem;
} }
} }
@ -316,7 +324,9 @@ namespace OpenSim.Services.LLLoginService
UUID secureSession = UUID.Zero; UUID secureSession = UUID.Zero;
if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession)))
{ {
m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: authentication failed"); m_log.InfoFormat(
"[LLOGIN SERVICE]: Login failed for {0} {1}, reason: authentication failed",
firstName, lastName);
return LLFailedLoginResponse.UserProblem; return LLFailedLoginResponse.UserProblem;
} }
@ -325,13 +335,18 @@ namespace OpenSim.Services.LLLoginService
// //
if (m_RequireInventory && m_InventoryService == null) if (m_RequireInventory && m_InventoryService == null)
{ {
m_log.WarnFormat("[LLOGIN SERVICE]: Login failed, reason: inventory service not set up"); m_log.WarnFormat(
"[LLOGIN SERVICE]: Login failed for {0} {1}, reason: inventory service not set up",
firstName, lastName);
return LLFailedLoginResponse.InventoryProblem; return LLFailedLoginResponse.InventoryProblem;
} }
List<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID); List<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID);
if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0))) if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0)))
{ {
m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: unable to retrieve user inventory"); m_log.InfoFormat(
"[LLOGIN SERVICE]: Login failed, for {0} {1}, reason: unable to retrieve user inventory",
firstName, lastName);
return LLFailedLoginResponse.InventoryProblem; return LLFailedLoginResponse.InventoryProblem;
} }
@ -345,9 +360,12 @@ namespace OpenSim.Services.LLLoginService
if (m_PresenceService != null) if (m_PresenceService != null)
{ {
success = m_PresenceService.LoginAgent(account.PrincipalID.ToString(), session, secureSession); success = m_PresenceService.LoginAgent(account.PrincipalID.ToString(), session, secureSession);
if (!success) if (!success)
{ {
m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: could not login presence"); m_log.InfoFormat(
"[LLOGIN SERVICE]: Login failed for {0} {1}, reason: could not login presence",
firstName, lastName);
return LLFailedLoginResponse.GridProblem; return LLFailedLoginResponse.GridProblem;
} }
} }
@ -380,9 +398,18 @@ namespace OpenSim.Services.LLLoginService
if (destination == null) if (destination == null)
{ {
m_PresenceService.LogoutAgent(session); m_PresenceService.LogoutAgent(session);
m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: destination not found");
m_log.InfoFormat(
"[LLOGIN SERVICE]: Login failed for {0} {1}, reason: destination not found",
firstName, lastName);
return LLFailedLoginResponse.GridProblem; return LLFailedLoginResponse.GridProblem;
} }
else
{
m_log.DebugFormat(
"[LLOGIN SERVICE]: Found destination {0}, endpoint {1} for {2} {3}",
destination.RegionName, destination.ExternalEndPoint, firstName, lastName);
}
if (account.UserLevel >= 200) if (account.UserLevel >= 200)
flags |= TeleportFlags.Godlike; flags |= TeleportFlags.Godlike;
@ -406,7 +433,7 @@ namespace OpenSim.Services.LLLoginService
if (aCircuit == null) if (aCircuit == null)
{ {
m_PresenceService.LogoutAgent(session); m_PresenceService.LogoutAgent(session);
m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: {0}", reason); m_log.InfoFormat("[LLOGIN SERVICE]: Login failed for {0} {1}, reason: {2}", firstName, lastName, reason);
return new LLFailedLoginResponse("key", reason, "false"); return new LLFailedLoginResponse("key", reason, "false");
} }
@ -427,7 +454,8 @@ namespace OpenSim.Services.LLLoginService
where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP,
m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone); m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone);
m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client."); m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName);
return response; return response;
} }
catch (Exception e) catch (Exception e)
@ -446,7 +474,9 @@ namespace OpenSim.Services.LLLoginService
{ {
flags = TeleportFlags.ViaLogin; flags = TeleportFlags.ViaLogin;
m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation); m_log.DebugFormat(
"[LLOGIN SERVICE]: Finding destination matching start location {0} for {1}",
startLocation, account.Name);
gatekeeper = null; gatekeeper = null;
where = "home"; where = "home";