aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-05 21:30:20 +0100
committerJustin Clark-Casey (justincc)2012-07-05 21:30:20 +0100
commitdb9616f7baa45fc15a9afded024655d4ad442556 (patch)
tree4a44c0724041bfe0683460fa024a2616e957cf46
parentregrade osFormatString, osMatchString and osReplaceString to VeryLow. (diff)
downloadopensim-SC_OLD-db9616f7baa45fc15a9afded024655d4ad442556.zip
opensim-SC_OLD-db9616f7baa45fc15a9afded024655d4ad442556.tar.gz
opensim-SC_OLD-db9616f7baa45fc15a9afded024655d4ad442556.tar.bz2
opensim-SC_OLD-db9616f7baa45fc15a9afded024655d4ad442556.tar.xz
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
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs56
1 files changed, 43 insertions, 13 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 9acba11..495dc52 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -257,7 +257,9 @@ namespace OpenSim.Services.LLLoginService
257 257
258 if (!am.Success) 258 if (!am.Success)
259 { 259 {
260 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: client {0} is not allowed", clientVersion); 260 m_log.InfoFormat(
261 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: client {2} is not allowed",
262 firstName, lastName, clientVersion);
261 return LLFailedLoginResponse.LoginBlockedProblem; 263 return LLFailedLoginResponse.LoginBlockedProblem;
262 } 264 }
263 } 265 }
@@ -269,7 +271,9 @@ namespace OpenSim.Services.LLLoginService
269 271
270 if (dm.Success) 272 if (dm.Success)
271 { 273 {
272 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: client {0} is denied", clientVersion); 274 m_log.InfoFormat(
275 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: client {2} is denied",
276 firstName, lastName, clientVersion);
273 return LLFailedLoginResponse.LoginBlockedProblem; 277 return LLFailedLoginResponse.LoginBlockedProblem;
274 } 278 }
275 } 279 }
@@ -280,13 +284,16 @@ namespace OpenSim.Services.LLLoginService
280 UserAccount account = m_UserAccountService.GetUserAccount(scopeID, firstName, lastName); 284 UserAccount account = m_UserAccountService.GetUserAccount(scopeID, firstName, lastName);
281 if (account == null) 285 if (account == null)
282 { 286 {
283 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: user not found"); 287 m_log.InfoFormat(
288 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: user not found", firstName, lastName);
284 return LLFailedLoginResponse.UserProblem; 289 return LLFailedLoginResponse.UserProblem;
285 } 290 }
286 291
287 if (account.UserLevel < m_MinLoginLevel) 292 if (account.UserLevel < m_MinLoginLevel)
288 { 293 {
289 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: login is blocked for user level {0}", account.UserLevel); 294 m_log.InfoFormat(
295 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: user level is {2} but minimum login level is {3}",
296 firstName, lastName, m_MinLoginLevel, account.UserLevel);
290 return LLFailedLoginResponse.LoginBlockedProblem; 297 return LLFailedLoginResponse.LoginBlockedProblem;
291 } 298 }
292 299
@@ -297,7 +304,8 @@ namespace OpenSim.Services.LLLoginService
297 { 304 {
298 if (account.ScopeID != scopeID && account.ScopeID != UUID.Zero) 305 if (account.ScopeID != scopeID && account.ScopeID != UUID.Zero)
299 { 306 {
300 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: user not found"); 307 m_log.InfoFormat(
308 "[LLOGIN SERVICE]: Login failed, reason: user {0} {1} not found", firstName, lastName);
301 return LLFailedLoginResponse.UserProblem; 309 return LLFailedLoginResponse.UserProblem;
302 } 310 }
303 } 311 }
@@ -316,7 +324,9 @@ namespace OpenSim.Services.LLLoginService
316 UUID secureSession = UUID.Zero; 324 UUID secureSession = UUID.Zero;
317 if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) 325 if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession)))
318 { 326 {
319 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: authentication failed"); 327 m_log.InfoFormat(
328 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: authentication failed",
329 firstName, lastName);
320 return LLFailedLoginResponse.UserProblem; 330 return LLFailedLoginResponse.UserProblem;
321 } 331 }
322 332
@@ -325,13 +335,18 @@ namespace OpenSim.Services.LLLoginService
325 // 335 //
326 if (m_RequireInventory && m_InventoryService == null) 336 if (m_RequireInventory && m_InventoryService == null)
327 { 337 {
328 m_log.WarnFormat("[LLOGIN SERVICE]: Login failed, reason: inventory service not set up"); 338 m_log.WarnFormat(
339 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: inventory service not set up",
340 firstName, lastName);
329 return LLFailedLoginResponse.InventoryProblem; 341 return LLFailedLoginResponse.InventoryProblem;
330 } 342 }
343
331 List<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID); 344 List<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID);
332 if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0))) 345 if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0)))
333 { 346 {
334 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: unable to retrieve user inventory"); 347 m_log.InfoFormat(
348 "[LLOGIN SERVICE]: Login failed, for {0} {1}, reason: unable to retrieve user inventory",
349 firstName, lastName);
335 return LLFailedLoginResponse.InventoryProblem; 350 return LLFailedLoginResponse.InventoryProblem;
336 } 351 }
337 352
@@ -345,9 +360,12 @@ namespace OpenSim.Services.LLLoginService
345 if (m_PresenceService != null) 360 if (m_PresenceService != null)
346 { 361 {
347 success = m_PresenceService.LoginAgent(account.PrincipalID.ToString(), session, secureSession); 362 success = m_PresenceService.LoginAgent(account.PrincipalID.ToString(), session, secureSession);
363
348 if (!success) 364 if (!success)
349 { 365 {
350 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: could not login presence"); 366 m_log.InfoFormat(
367 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: could not login presence",
368 firstName, lastName);
351 return LLFailedLoginResponse.GridProblem; 369 return LLFailedLoginResponse.GridProblem;
352 } 370 }
353 } 371 }
@@ -380,9 +398,18 @@ namespace OpenSim.Services.LLLoginService
380 if (destination == null) 398 if (destination == null)
381 { 399 {
382 m_PresenceService.LogoutAgent(session); 400 m_PresenceService.LogoutAgent(session);
383 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: destination not found"); 401
402 m_log.InfoFormat(
403 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: destination not found",
404 firstName, lastName);
384 return LLFailedLoginResponse.GridProblem; 405 return LLFailedLoginResponse.GridProblem;
385 } 406 }
407 else
408 {
409 m_log.DebugFormat(
410 "[LLOGIN SERVICE]: Found destination {0}, endpoint {1} for {2} {3}",
411 destination.RegionName, destination.ExternalEndPoint, firstName, lastName);
412 }
386 413
387 if (account.UserLevel >= 200) 414 if (account.UserLevel >= 200)
388 flags |= TeleportFlags.Godlike; 415 flags |= TeleportFlags.Godlike;
@@ -406,7 +433,7 @@ namespace OpenSim.Services.LLLoginService
406 if (aCircuit == null) 433 if (aCircuit == null)
407 { 434 {
408 m_PresenceService.LogoutAgent(session); 435 m_PresenceService.LogoutAgent(session);
409 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: {0}", reason); 436 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed for {0} {1}, reason: {2}", firstName, lastName, reason);
410 return new LLFailedLoginResponse("key", reason, "false"); 437 return new LLFailedLoginResponse("key", reason, "false");
411 438
412 } 439 }
@@ -427,7 +454,8 @@ namespace OpenSim.Services.LLLoginService
427 where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, 454 where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP,
428 m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone); 455 m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone);
429 456
430 m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client."); 457 m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName);
458
431 return response; 459 return response;
432 } 460 }
433 catch (Exception e) 461 catch (Exception e)
@@ -446,7 +474,9 @@ namespace OpenSim.Services.LLLoginService
446 { 474 {
447 flags = TeleportFlags.ViaLogin; 475 flags = TeleportFlags.ViaLogin;
448 476
449 m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation); 477 m_log.DebugFormat(
478 "[LLOGIN SERVICE]: Finding destination matching start location {0} for {1}",
479 startLocation, account.Name);
450 480
451 gatekeeper = null; 481 gatekeeper = null;
452 where = "home"; 482 where = "home";