aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-07-20 01:32:27 +0000
committerAdam Frisby2007-07-20 01:32:27 +0000
commit765ff13f22ce062066e461b73f0aa6881b4fea29 (patch)
treea69ce2fbbff788416fc0b0fb3f8438f00e95aac1
parent* New log functions which include the module name as an argument. (diff)
downloadopensim-SC-765ff13f22ce062066e461b73f0aa6881b4fea29.zip
opensim-SC-765ff13f22ce062066e461b73f0aa6881b4fea29.tar.gz
opensim-SC-765ff13f22ce062066e461b73f0aa6881b4fea29.tar.bz2
opensim-SC-765ff13f22ce062066e461b73f0aa6881b4fea29.tar.xz
* Assortment of Console changes - console messages are now grouped into modules (eg "client", "grid", "terrain", "storage", etc)
-rw-r--r--OpenSim/Framework/Console/LogBase.cs5
-rw-r--r--OpenSim/Framework/General/Configuration/ConfigurationMember.cs2
-rw-r--r--OpenSim/Framework/UserManager/LoginResponse.cs2
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs6
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs24
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs4
-rw-r--r--OpenSim/Region/ClientStack/ClientViewBase.cs2
-rw-r--r--OpenSim/Region/ClientStack/UDPServer.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs12
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs4
11 files changed, 34 insertions, 31 deletions
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs
index db76861..7d38c3a 100644
--- a/OpenSim/Framework/Console/LogBase.cs
+++ b/OpenSim/Framework/Console/LogBase.cs
@@ -73,14 +73,18 @@ namespace OpenSim.Framework.Console
73 Log.Close(); 73 Log.Close();
74 } 74 }
75 75
76 [Obsolete("Log.WriteLine is obsolete, use Warn / Error / Verbose instead.")]
76 public void Write(string format, params object[] args) 77 public void Write(string format, params object[] args)
77 { 78 {
79 // HOUSEKEEPING : Will remove once use is removed.
78 Notice(format, args); 80 Notice(format, args);
79 return; 81 return;
80 } 82 }
81 83
84 [Obsolete("Log.WriteLine is obsolete, use Warn / Error / Verbose instead.")]
82 public void WriteLine(LogPriority importance, string format, params object[] args) 85 public void WriteLine(LogPriority importance, string format, params object[] args)
83 { 86 {
87 // HOUSEKEEPING : Will remove once use is removed.
84 Log.WriteLine(format, args); 88 Log.WriteLine(format, args);
85 Log.Flush(); 89 Log.Flush();
86 if (!m_silent) 90 if (!m_silent)
@@ -249,6 +253,7 @@ namespace OpenSim.Framework.Console
249 253
250 private void WritePrefixLine(ConsoleColor color, string sender) 254 private void WritePrefixLine(ConsoleColor color, string sender)
251 { 255 {
256 sender = sender.ToUpper();
252 Log.WriteLine("[" + sender + "] "); 257 Log.WriteLine("[" + sender + "] ");
253 Log.Flush(); 258 Log.Flush();
254 259
diff --git a/OpenSim/Framework/General/Configuration/ConfigurationMember.cs b/OpenSim/Framework/General/Configuration/ConfigurationMember.cs
index 4546683..a0d019c 100644
--- a/OpenSim/Framework/General/Configuration/ConfigurationMember.cs
+++ b/OpenSim/Framework/General/Configuration/ConfigurationMember.cs
@@ -329,7 +329,7 @@ namespace OpenSim.Framework.Configuration
329 } 329 }
330 else 330 else
331 { 331 {
332 MainLog.Instance.Warn("Incorrect result given, the configuration option must be " + errorMessage + ". Prompting for same option..."); 332 MainLog.Instance.Warn("configuration","Incorrect result given, the configuration option must be " + errorMessage + ". Prompting for same option...");
333 ignoreNextFromConfig = true; 333 ignoreNextFromConfig = true;
334 } 334 }
335 } 335 }
diff --git a/OpenSim/Framework/UserManager/LoginResponse.cs b/OpenSim/Framework/UserManager/LoginResponse.cs
index d3dfd5b..326b943 100644
--- a/OpenSim/Framework/UserManager/LoginResponse.cs
+++ b/OpenSim/Framework/UserManager/LoginResponse.cs
@@ -223,8 +223,6 @@ namespace OpenSim.Framework.UserManagement
223 responseData["sim_port"] =(Int32) this.SimPort; 223 responseData["sim_port"] =(Int32) this.SimPort;
224 responseData["sim_ip"] = this.SimAddress; 224 responseData["sim_ip"] = this.SimAddress;
225 225
226 MainLog.Instance.Warn("SIM IP: " + responseData["sim_ip"] + "; SIM PORT: " + responseData["sim_port"]);
227
228 responseData["agent_id"] = this.AgentID.ToStringHyphenated(); 226 responseData["agent_id"] = this.AgentID.ToStringHyphenated();
229 responseData["session_id"] = this.SessionID.ToStringHyphenated(); 227 responseData["session_id"] = this.SessionID.ToStringHyphenated();
230 responseData["secure_session_id"] = this.SecureSessionID.ToStringHyphenated(); 228 responseData["secure_session_id"] = this.SecureSessionID.ToStringHyphenated();
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index 5a8368c..bd6341b 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -158,13 +158,13 @@ namespace OpenSim.Grid.AssetServer
158 try 158 try
159 { 159 {
160 db = Db4oFactory.OpenFile("gridassets.yap"); 160 db = Db4oFactory.OpenFile("gridassets.yap");
161 MainLog.Instance.Verbose("Main.cs:setupDB() - creation"); 161 MainLog.Instance.Verbose("storage", "Main.cs:setupDB() - creation");
162 } 162 }
163 catch (Exception e) 163 catch (Exception e)
164 { 164 {
165 db.Close(); 165 db.Close();
166 MainLog.Instance.Warn("Main.cs:setupDB() - Exception occured"); 166 MainLog.Instance.Warn("storage", "Main.cs:setupDB() - Exception occured");
167 MainLog.Instance.Warn(e.ToString()); 167 MainLog.Instance.Warn("storage", e.ToString());
168 } 168 }
169 if (!yapfile) 169 if (!yapfile)
170 { 170 {
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index 3ee7aef..f4a8475 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Grid.GridServer
112 } 112 }
113 catch (Exception) 113 catch (Exception)
114 { 114 {
115 MainLog.Instance.Warn("Storage: unable to write log via " + kvp.Key); 115 MainLog.Instance.Warn("storage", "Unable to write log via " + kvp.Key);
116 } 116 }
117 } 117 }
118 } 118 }
@@ -131,7 +131,7 @@ namespace OpenSim.Grid.GridServer
131 } 131 }
132 catch (Exception e) 132 catch (Exception e)
133 { 133 {
134 MainLog.Instance.Warn("Message from Storage: " + e.Message); 134 MainLog.Instance.Warn("storage", "getRegion - " + e.Message);
135 } 135 }
136 } 136 }
137 return null; 137 return null;
@@ -152,7 +152,7 @@ namespace OpenSim.Grid.GridServer
152 } 152 }
153 catch 153 catch
154 { 154 {
155 MainLog.Instance.Warn("Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key); 155 MainLog.Instance.Warn("storage", "Unable to find region " + handle.ToString() + " via " + kvp.Key);
156 } 156 }
157 } 157 }
158 return null; 158 return null;
@@ -176,7 +176,7 @@ namespace OpenSim.Grid.GridServer
176 } 176 }
177 catch 177 catch
178 { 178 {
179 MainLog.Instance.Warn("Storage: Unable to query regionblock via " + kvp.Key); 179 MainLog.Instance.Warn("storage", "Unable to query regionblock via " + kvp.Key);
180 } 180 }
181 } 181 }
182 182
@@ -288,24 +288,24 @@ namespace OpenSim.Grid.GridServer
288 switch(insertResponse) 288 switch(insertResponse)
289 { 289 {
290 case DataResponse.RESPONSE_OK: 290 case DataResponse.RESPONSE_OK:
291 OpenSim.Framework.Console.MainLog.Instance.Verbose("New sim creation successful: " + TheSim.regionName); 291 OpenSim.Framework.Console.MainLog.Instance.Verbose("grid", "New sim creation successful: " + TheSim.regionName);
292 break; 292 break;
293 case DataResponse.RESPONSE_ERROR: 293 case DataResponse.RESPONSE_ERROR:
294 OpenSim.Framework.Console.MainLog.Instance.Warn("New sim creation failed (Error): " + TheSim.regionName); 294 OpenSim.Framework.Console.MainLog.Instance.Warn("storage", "New sim creation failed (Error): " + TheSim.regionName);
295 break; 295 break;
296 case DataResponse.RESPONSE_INVALIDCREDENTIALS: 296 case DataResponse.RESPONSE_INVALIDCREDENTIALS:
297 OpenSim.Framework.Console.MainLog.Instance.Warn("New sim creation failed (Invalid Credentials): " + TheSim.regionName); 297 OpenSim.Framework.Console.MainLog.Instance.Warn("storage", "New sim creation failed (Invalid Credentials): " + TheSim.regionName);
298 break; 298 break;
299 case DataResponse.RESPONSE_AUTHREQUIRED: 299 case DataResponse.RESPONSE_AUTHREQUIRED:
300 OpenSim.Framework.Console.MainLog.Instance.Warn("New sim creation failed (Authentication Required): " + TheSim.regionName); 300 OpenSim.Framework.Console.MainLog.Instance.Warn("storage", "New sim creation failed (Authentication Required): " + TheSim.regionName);
301 break; 301 break;
302 } 302 }
303 303
304 } 304 }
305 catch (Exception e) 305 catch (Exception e)
306 { 306 {
307 OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to add region " + TheSim.UUID.ToStringHyphenated() + " via " + kvp.Key); 307 OpenSim.Framework.Console.MainLog.Instance.Warn("storage", "Unable to add region " + TheSim.UUID.ToStringHyphenated() + " via " + kvp.Key);
308 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); 308 OpenSim.Framework.Console.MainLog.Instance.Warn("storage", e.ToString());
309 } 309 }
310 } 310 }
311 311
@@ -687,12 +687,12 @@ namespace OpenSim.Grid.GridServer
687 if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) || (reserveData == null && authkeynode.InnerText != TheSim.regionRecvKey)) 687 if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) || (reserveData == null && authkeynode.InnerText != TheSim.regionRecvKey))
688 { 688 {
689 kvp.Value.AddProfile(TheSim); 689 kvp.Value.AddProfile(TheSim);
690 MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")"); 690 MainLog.Instance.Verbose("grid", "New sim added to grid (" + TheSim.regionName + ")");
691 logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid."); 691 logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid.");
692 } 692 }
693 else 693 else
694 { 694 {
695 MainLog.Instance.Warn("Unable to update region (RestSetSimMethod): Incorrect reservation auth key.");// Wanted: " + reserveData.gridRecvKey + ", Got: " + TheSim.regionRecvKey + "."); 695 MainLog.Instance.Warn("grid", "Unable to update region (RestSetSimMethod): Incorrect reservation auth key.");// Wanted: " + reserveData.gridRecvKey + ", Got: " + TheSim.regionRecvKey + ".");
696 return "Unable to update region (RestSetSimMethod): Incorrect auth key."; 696 return "Unable to update region (RestSetSimMethod): Incorrect auth key.";
697 } 697 }
698 } 698 }
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 084f7e0..c99c365 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -305,7 +305,7 @@ namespace OpenSim.Region.ClientStack
305 } 305 }
306 catch (Exception e) 306 catch (Exception e)
307 { 307 {
308 MainLog.Instance.Warn("ClientView API.cs: SendLayerData() - Failed with exception " + e.ToString()); 308 MainLog.Instance.Warn("client", "ClientView API.cs: SendLayerData() - Failed with exception " + e.ToString());
309 } 309 }
310 } 310 }
311 311
@@ -331,7 +331,7 @@ namespace OpenSim.Region.ClientStack
331 } 331 }
332 catch (Exception e) 332 catch (Exception e)
333 { 333 {
334 MainLog.Instance.Warn("ClientView API .cs: SendLayerData() - Failed with exception " + e.ToString()); 334 MainLog.Instance.Warn("client", "ClientView API .cs: SendLayerData() - Failed with exception " + e.ToString());
335 } 335 }
336 } 336 }
337 337
diff --git a/OpenSim/Region/ClientStack/ClientViewBase.cs b/OpenSim/Region/ClientStack/ClientViewBase.cs
index 597cd7d..2cd730b 100644
--- a/OpenSim/Region/ClientStack/ClientViewBase.cs
+++ b/OpenSim/Region/ClientStack/ClientViewBase.cs
@@ -158,7 +158,7 @@ namespace OpenSim.Region.ClientStack
158 } 158 }
159 catch (Exception) 159 catch (Exception)
160 { 160 {
161 MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread"); 161 MainLog.Instance.Warn("client", "OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread");
162 this.KillThread(); 162 this.KillThread();
163 } 163 }
164 164
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs
index f90a213..2c10df9 100644
--- a/OpenSim/Region/ClientStack/UDPServer.cs
+++ b/OpenSim/Region/ClientStack/UDPServer.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ClientStack
122 } 122 }
123 else 123 else
124 { // invalid client 124 { // invalid client
125 m_log.Warn("UDPServer.cs:OnReceivedData() - WARNING: Got a packet from an invalid client - " + epSender.ToString()); 125 m_log.Warn("client", "UDPServer.cs:OnReceivedData() - WARNING: Got a packet from an invalid client - " + epSender.ToString());
126 } 126 }
127 127
128 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 128 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 5bfdccb..9a81a5f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -256,7 +256,7 @@ namespace OpenSim.Region.Environment.Scenes
256 } 256 }
257 else 257 else
258 { 258 {
259 OpenSim.Framework.Console.MainLog.Instance.Warn("Attempted to duplicate nonexistant prim"); 259 OpenSim.Framework.Console.MainLog.Instance.Warn("client", "Attempted to duplicate nonexistant prim");
260 } 260 }
261 261
262 } 262 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 3e7b820..a660d82 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -248,7 +248,7 @@ namespace OpenSim.Region.Environment.Scenes
248 } 248 }
249 catch (Exception e) 249 catch (Exception e)
250 { 250 {
251 MainLog.Instance.Warn("World.cs: Update() - Failed with exception " + e.ToString()); 251 MainLog.Instance.Warn("scene", "World.cs: Update() - Failed with exception " + e.ToString());
252 } 252 }
253 updateLock.ReleaseMutex(); 253 updateLock.ReleaseMutex();
254 } 254 }
@@ -295,7 +295,7 @@ namespace OpenSim.Region.Environment.Scenes
295 } 295 }
296 catch (Exception e) 296 catch (Exception e)
297 { 297 {
298 MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 298 MainLog.Instance.Warn("terrain", "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
299 } 299 }
300 } 300 }
301 301
@@ -326,7 +326,7 @@ namespace OpenSim.Region.Environment.Scenes
326 } 326 }
327 catch (Exception e) 327 catch (Exception e)
328 { 328 {
329 MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 329 MainLog.Instance.Warn("terrain", "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
330 } 330 }
331 } 331 }
332 332
@@ -352,7 +352,7 @@ namespace OpenSim.Region.Environment.Scenes
352 } 352 }
353 catch (Exception e) 353 catch (Exception e)
354 { 354 {
355 MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 355 MainLog.Instance.Warn("terrain", "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
356 } 356 }
357 } 357 }
358 358
@@ -402,7 +402,7 @@ namespace OpenSim.Region.Environment.Scenes
402 } 402 }
403 catch (Exception e) 403 catch (Exception e)
404 { 404 {
405 MainLog.Instance.Warn("World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); 405 MainLog.Instance.Warn("terrain", "World.cs: LoadWorldMap() - Failed with exception " + e.ToString());
406 } 406 }
407 } 407 }
408 408
@@ -784,7 +784,7 @@ namespace OpenSim.Region.Environment.Scenes
784 cap.RegisterHandlers(); 784 cap.RegisterHandlers();
785 if (capsHandlers.ContainsKey(agent.AgentID)) 785 if (capsHandlers.ContainsKey(agent.AgentID))
786 { 786 {
787 MainLog.Instance.Warn("Adding duplicate CAPS entry for user " + 787 MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " +
788 agent.AgentID.ToStringHyphenated()); 788 agent.AgentID.ToStringHyphenated());
789 capsHandlers[agent.AgentID] = cap; 789 capsHandlers[agent.AgentID] = cap;
790 } 790 }
diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs
index 831c165..f52e9e2 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs
@@ -76,14 +76,14 @@ namespace OpenSim.Region.Scripting
76 Vector myPosition = Task.Pos; 76 Vector myPosition = Task.Pos;
77 Land myParcel = World.LandManager.getLandObject(myPosition.X, myPosition.Y); 77 Land myParcel = World.LandManager.getLandObject(myPosition.X, myPosition.Y);
78 78
79 OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)"); 79 OpenSim.Framework.Console.MainLog.Instance.Warn("script", "Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)");
80 return; 80 return;
81 } 81 }
82 82
83 [Obsolete("Unimplemented")] 83 [Obsolete("Unimplemented")]
84 public void osAdjustSoundVolume(float volume) 84 public void osAdjustSoundVolume(float volume)
85 { 85 {
86 OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented function called by script: osAdjustSoundVolume(float volume)"); 86 OpenSim.Framework.Console.MainLog.Instance.Warn("script", "Unimplemented function called by script: osAdjustSoundVolume(float volume)");
87 return; 87 return;
88 } 88 }
89 89