aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-04-15 22:41:34 +0000
committerJustin Clarke Casey2008-04-15 22:41:34 +0000
commit379ac9c92ac2cdaf9ad4cc1e66de243a42ae7c42 (patch)
treea5d3f2367e901e3c2ce8f92cc5e5653c7111822f /OpenSim/Framework
parent* Send a meaningful response to both the user server console and the client i... (diff)
downloadopensim-SC-379ac9c92ac2cdaf9ad4cc1e66de243a42ae7c42.zip
opensim-SC-379ac9c92ac2cdaf9ad4cc1e66de243a42ae7c42.tar.gz
opensim-SC-379ac9c92ac2cdaf9ad4cc1e66de243a42ae7c42.tar.bz2
opensim-SC-379ac9c92ac2cdaf9ad4cc1e66de243a42ae7c42.tar.xz
* Make it easier to follow logins on the user server by changing and tidying up log messages
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs40
1 files changed, 22 insertions, 18 deletions
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index f8ac75e..d610c51 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -121,25 +121,28 @@ namespace OpenSim.Framework.UserManagement
121 lastname = (string) requestData["last"]; 121 lastname = (string) requestData["last"];
122 122
123 m_log.InfoFormat( 123 m_log.InfoFormat(
124 "[LOGIN]: Received login request message from user {0} {1}", 124 "[LOGIN BEGIN]: Received login request message from user {0} {1}",
125 firstname, lastname); 125 firstname, lastname);
126 126
127 if( requestData.Contains("version")) 127 string clientVersion = "Unknown";
128
129 if (requestData.Contains("version"))
128 { 130 {
129 string clientversion = (string)requestData["version"]; 131 clientVersion = (string)requestData["version"];
130 m_log.Info("[LOGIN]: Client version: " + clientversion);
131 } 132 }
132 133
133 if (requestData.Contains("start")) 134 if (requestData.Contains("start"))
134 { 135 {
135 startLocationRequest = (string)requestData["start"]; 136 startLocationRequest = (string)requestData["start"];
136 m_log.Info("[LOGIN]: Client requested start location: " + (string)requestData["start"]);
137 } 137 }
138
139 m_log.DebugFormat(
140 "[LOGIN]: Client is {0}, start location is {1}", clientVersion, startLocationRequest);
138 141
139 userProfile = GetTheUser(firstname, lastname); 142 userProfile = GetTheUser(firstname, lastname);
140 if (userProfile == null) 143 if (userProfile == null)
141 { 144 {
142 m_log.Info("[LOGIN]: Could not find a profile for " + firstname + " " + lastname); 145 m_log.Info("[LOGIN END]: Could not find a profile for " + firstname + " " + lastname);
143 146
144 return logResponse.CreateLoginFailedResponse(); 147 return logResponse.CreateLoginFailedResponse();
145 } 148 }
@@ -159,7 +162,7 @@ namespace OpenSim.Framework.UserManagement
159 catch (System.Exception e) 162 catch (System.Exception e)
160 { 163 {
161 m_log.InfoFormat( 164 m_log.InfoFormat(
162 "[LOGIN]: Bad web_login_key: {0} for user {1} {2}, exception {3}", 165 "[LOGIN END]: Bad web_login_key: {0} for user {1} {2}, exception {3}",
163 requestData["web_login_key"], firstname, lastname, e); 166 requestData["web_login_key"], firstname, lastname, e);
164 167
165 return logResponse.CreateFailedResponse(); 168 return logResponse.CreateFailedResponse();
@@ -171,14 +174,14 @@ namespace OpenSim.Framework.UserManagement
171 else 174 else
172 { 175 {
173 m_log.Info( 176 m_log.Info(
174 "[LOGIN]: login_to_simulator login message did not contain all the required data"); 177 "[LOGIN END]: login_to_simulator login message did not contain all the required data");
175 178
176 return logResponse.CreateGridErrorResponse(); 179 return logResponse.CreateGridErrorResponse();
177 } 180 }
178 181
179 if (!GoodLogin) 182 if (!GoodLogin)
180 { 183 {
181 m_log.InfoFormat("[LOGIN]: User {0} {1} failed authentication", firstname, lastname); 184 m_log.InfoFormat("[LOGIN END]: User {0} {1} failed authentication", firstname, lastname);
182 185
183 return logResponse.CreateLoginFailedResponse(); 186 return logResponse.CreateLoginFailedResponse();
184 } 187 }
@@ -197,7 +200,7 @@ namespace OpenSim.Framework.UserManagement
197 // Reject the login 200 // Reject the login
198 201
199 m_log.InfoFormat( 202 m_log.InfoFormat(
200 "[LOGIN]: Notifying user {0} {1} that they are already logged in", 203 "[LOGIN END]: Notifying user {0} {1} that they are already logged in",
201 firstname, lastname); 204 firstname, lastname);
202 205
203 return logResponse.CreateAlreadyLoggedInResponse(); 206 return logResponse.CreateAlreadyLoggedInResponse();
@@ -218,8 +221,9 @@ namespace OpenSim.Framework.UserManagement
218 catch (System.Net.WebException e) 221 catch (System.Net.WebException e)
219 { 222 {
220 m_log.ErrorFormat( 223 m_log.ErrorFormat(
221 "[LOGIN]: Error retrieving inventory skeleton of agent {0}, {1} - {2}", agentID, e.GetType(), e.Message); 224 "[LOGIN END]: Error retrieving inventory skeleton of agent {0}, {1} - {2}",
222 225 agentID, e.GetType(), e.Message);
226
223 return logResponse.CreateLoginInventoryFailedResponse(); 227 return logResponse.CreateLoginInventoryFailedResponse();
224 } 228 }
225 229
@@ -269,7 +273,7 @@ namespace OpenSim.Framework.UserManagement
269 } 273 }
270 catch (Exception e) 274 catch (Exception e)
271 { 275 {
272 m_log.Info("[LOGIN]: " + e.ToString()); 276 m_log.Info("[LOGIN END]: " + e.ToString());
273 return logResponse.CreateDeadRegionResponse(); 277 return logResponse.CreateDeadRegionResponse();
274 //return logResponse.ToXmlRpcResponse(); 278 //return logResponse.ToXmlRpcResponse();
275 } 279 }
@@ -279,19 +283,19 @@ namespace OpenSim.Framework.UserManagement
279 if (StatsManager.UserStats != null) 283 if (StatsManager.UserStats != null)
280 StatsManager.UserStats.AddSuccessfulLogin(); 284 StatsManager.UserStats.AddSuccessfulLogin();
281 285
282 m_log.InfoFormat( 286 m_log.DebugFormat(
283 "[LOGIN]: Authentication of user {0} {1} successful. Sending response to client.", 287 "[LOGIN END]: Authentication of user {0} {1} successful. Sending response to client.",
284 firstname, lastname); 288 firstname, lastname);
285 289
286 return logResponse.ToXmlRpcResponse(); 290 return logResponse.ToXmlRpcResponse();
287 } 291 }
288 catch (Exception e) 292 catch (Exception e)
289 { 293 {
290 m_log.Info("[LOGIN]: Login failed, " + e.ToString()); 294 m_log.Info("[LOGIN END]: Login failed, " + e.ToString());
291 } 295 }
292 } 296 }
293 297
294 m_log.Info("[LOGIN]: Login failed. Sending back blank XMLRPC response"); 298 m_log.Info("[LOGIN END]: Login failed. Sending back blank XMLRPC response");
295 return response; 299 return response;
296 } 300 }
297 finally 301 finally
@@ -654,7 +658,7 @@ namespace OpenSim.Framework.UserManagement
654 public virtual bool AuthenticateUser(UserProfileData profile, string password) 658 public virtual bool AuthenticateUser(UserProfileData profile, string password)
655 { 659 {
656 bool passwordSuccess = false; 660 bool passwordSuccess = false;
657 m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.FirstName, profile.SurName, profile.ID); 661 //m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.FirstName, profile.SurName, profile.ID);
658 662
659 // Web Login method seems to also occasionally send the hashed password itself 663 // Web Login method seems to also occasionally send the hashed password itself
660 664