aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorOren Hurvitz2012-04-23 15:31:45 +0300
committerJustin Clark-Casey (justincc)2012-04-24 21:38:09 +0100
commit2f398231acda79e313c2975ecdd5a6015cb71a54 (patch)
treeb5277aca723d6ccf74ec875d4b6fd05e8c9453c1 /OpenSim
parentRefactored how asset/inventory types are associated with content types: gathe... (diff)
downloadopensim-SC_OLD-2f398231acda79e313c2975ecdd5a6015cb71a54.zip
opensim-SC_OLD-2f398231acda79e313c2975ecdd5a6015cb71a54.tar.gz
opensim-SC_OLD-2f398231acda79e313c2975ecdd5a6015cb71a54.tar.bz2
opensim-SC_OLD-2f398231acda79e313c2975ecdd5a6015cb71a54.tar.xz
Minor improvements to logging
Eliminated an extra newline in the console if the log line doesn't contain a category (example of a category: "[ASSETS]").
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Console/LocalConsole.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs11
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs8
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs5
6 files changed, 24 insertions, 12 deletions
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs
index 7c8626d..f65813b 100644
--- a/OpenSim/Framework/Console/LocalConsole.cs
+++ b/OpenSim/Framework/Console/LocalConsole.cs
@@ -296,6 +296,10 @@ namespace OpenSim.Framework.Console
296 matches[0].Groups["Category"].Value); 296 matches[0].Groups["Category"].Value);
297 System.Console.Write("]:"); 297 System.Console.Write("]:");
298 } 298 }
299 else
300 {
301 outText = outText.Trim();
302 }
299 } 303 }
300 304
301 if (level == "error") 305 if (level == "error")
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index faa413e..0618add 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -143,7 +143,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
143 } 143 }
144 catch (Exception e) 144 catch (Exception e)
145 { 145 {
146 m_log.ErrorFormat("[ATTACHMENTS MODULE]: Unable to rez attachment: {0}{1}", e.Message, e.StackTrace); 146 UUID agentId = (sp.ControllingClient == null) ? (UUID)null : sp.ControllingClient.AgentId;
147 m_log.ErrorFormat("[ATTACHMENTS MODULE]: Unable to rez attachment with itemID {0}, assetID {1}, point {2} for {3}: {4}\n{5}",
148 attach.ItemID, attach.AssetID, p, agentId, e.Message, e.StackTrace);
147 } 149 }
148 } 150 }
149 } 151 }
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index b0cee03..bf5609f 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -248,10 +248,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
248 248
249 if (bakedTextureFace == null) 249 if (bakedTextureFace == null)
250 { 250 {
251 m_log.WarnFormat( 251 // This can happen legitimately, since some baked textures might not exist
252 "[AV FACTORY]: No texture ID set for {0} for {1} in {2} not found when trying to save permanently", 252 //m_log.WarnFormat(
253 bakeType, sp.Name, m_scene.RegionInfo.RegionName); 253 // "[AV FACTORY]: No texture ID set for {0} for {1} in {2} not found when trying to save permanently",
254 254 // bakeType, sp.Name, m_scene.RegionInfo.RegionName);
255 continue; 255 continue;
256 } 256 }
257 257
@@ -417,7 +417,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
417// acd.AgentID, i, acd.Appearance.Texture.FaceTextures[i]); 417// acd.AgentID, i, acd.Appearance.Texture.FaceTextures[i]);
418 418
419 int ftIndex = (int)AppearanceManager.BakeTypeToAgentTextureIndex(bakeType); 419 int ftIndex = (int)AppearanceManager.BakeTypeToAgentTextureIndex(bakeType);
420 bakedTextures[bakeType] = faceTextures[ftIndex]; 420 Primitive.TextureEntryFace texture = faceTextures[ftIndex]; // this will be null if there's no such baked texture
421 bakedTextures[bakeType] = texture;
421 } 422 }
422 423
423 return bakedTextures; 424 return bakedTextures;
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 2b8379d..435a683 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -157,7 +157,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
157 157
158 sp.CompleteMovement(npcAvatar, false); 158 sp.CompleteMovement(npcAvatar, false);
159 m_avatars.Add(npcAvatar.AgentId, npcAvatar); 159 m_avatars.Add(npcAvatar.AgentId, npcAvatar);
160 m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId); 160 m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name);
161 161
162 return npcAvatar.AgentId; 162 return npcAvatar.AgentId;
163 } 163 }
@@ -299,7 +299,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
299 scene.RemoveClient(agentID, false); 299 scene.RemoveClient(agentID, false);
300 m_avatars.Remove(agentID); 300 m_avatars.Remove(agentID);
301 301
302// m_log.DebugFormat("[NPC MODULE]: Removed {0} {1}", agentID, av.Name); 302 m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}", agentID, av.Name);
303 return true; 303 return true;
304 } 304 }
305 } 305 }
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 23a4cf9..a9b6e67 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1812,9 +1812,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1812 // if there already exists a file at that location, it may be locked. 1812 // if there already exists a file at that location, it may be locked.
1813 m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", path, ex.Message); 1813 m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", path, ex.Message);
1814 } 1814 }
1815
1816 string textpath = path + ".text";
1815 try 1817 try
1816 { 1818 {
1817 using (FileStream fs = File.Create(path + ".text")) 1819 using (FileStream fs = File.Create(textpath))
1818 { 1820 {
1819 using (StreamWriter sw = new StreamWriter(fs)) 1821 using (StreamWriter sw = new StreamWriter(fs))
1820 { 1822 {
@@ -1827,7 +1829,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1827 catch (IOException ex) 1829 catch (IOException ex)
1828 { 1830 {
1829 // if there already exists a file at that location, it may be locked. 1831 // if there already exists a file at that location, it may be locked.
1830 m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", path, ex.Message); 1832 m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", textpath, ex.Message);
1831 } 1833 }
1832 } 1834 }
1833 } 1835 }
@@ -1876,7 +1878,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1876 catch (IOException ex) 1878 catch (IOException ex)
1877 { 1879 {
1878 // if there already exists a file at that location, it may be locked. 1880 // if there already exists a file at that location, it may be locked.
1879 m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", statepath, ex.Message); 1881 m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", mappath, ex.Message);
1880 } 1882 }
1881 } 1883 }
1882 1884
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index 8effdd2..0cc2a4b 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -117,7 +117,10 @@ namespace OpenSim.Server.Base
117 catch (Exception e) 117 catch (Exception e)
118 { 118 {
119 if (!(e is System.MissingMethodException)) 119 if (!(e is System.MissingMethodException))
120 m_log.ErrorFormat("Error loading plugin from {0}, exception {1}", dllName, e.InnerException); 120 {
121 m_log.ErrorFormat("Error loading plugin {0} from {1}. Exception: {2}",
122 interfaceName, dllName, e.InnerException == null ? e.Message : e.InnerException.Message);
123 }
121 return null; 124 return null;
122 } 125 }
123 126