From 8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 22 Feb 2009 20:52:55 +0000 Subject: Mantis#3218. Thank you kindly, TLaukkan (Tommil) for a patch that: * Added log4net dependency to physxplugin in prebuild.xml. * Added missing m_log fields to classes. * Replaced Console.WriteLine with appropriate m_log.Xxxx * Tested that nant test target runs succesfully. * Tested that local opensim sandbox starts up without errors. --- .../CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | 9 ++++++--- .../CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs | 7 +++++-- .../CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 8 ++++++-- OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs | 2 +- 4 files changed, 18 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/CoreModules/Scripting') diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index ab404bd..b4ec7ae 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs @@ -35,6 +35,8 @@ using OpenMetaverse.Imaging; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using log4net; +using System.Reflection; namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture { @@ -86,7 +88,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture { if (RenderPlugins.ContainsKey(contentType)) { - //Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType); + //m_log.Debug("dynamic texture being created: " + url + " of type " + contentType); DynamicTextureUpdater updater = new DynamicTextureUpdater(); updater.SimUUID = simID; @@ -192,6 +194,8 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture public class DynamicTextureUpdater { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + public bool BlendWithOldTexture = false; public string BodyData; public string ContentType; @@ -302,8 +306,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture } catch (Exception) { - Console.WriteLine( - "[DYNAMICTEXTUREMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); + m_log.Error("[DYNAMICTEXTUREMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); } return result; diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs index 96618e0..4abc55d 100644 --- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs @@ -34,11 +34,15 @@ using OpenMetaverse; using OpenMetaverse.Imaging; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using log4net; +using System.Reflection; namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL { public class LoadImageURLModule : IRegionModule, IDynamicTextureRender { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private string m_name = "LoadImageURL"; private Scene m_scene; private IDynamicTextureManager m_textureManager; @@ -203,8 +207,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL } catch (Exception) { - Console.WriteLine( - "[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); + m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); } m_textureManager.ReturnData(state.RequestID, imageJ2000); diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index e7fabbe..4fb500e 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -36,6 +36,8 @@ using OpenMetaverse; using OpenMetaverse.Imaging; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using log4net; +using System.Reflection; //using Cairo; @@ -43,6 +45,8 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender { public class VectorRenderModule : IRegionModule, IDynamicTextureRender { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private string m_name = "VectorRenderModule"; private Scene m_scene; private IDynamicTextureManager m_textureManager; @@ -317,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender } catch (Exception) { - Console.WriteLine( + m_log.Error( "[VECTORRENDERMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); } m_textureManager.ReturnData(id, imageJ2000); @@ -333,7 +337,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender catch (Exception) { //Ckrinke: Add a WriteLine to remove the warning about 'e' defined but not used - // Console.WriteLine("Problem with Draw. Please verify parameters." + e.ToString()); + // m_log.Debug("Problem with Draw. Please verify parameters." + e.ToString()); parsed = -1; } diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs index 38cb502..d917adc 100644 --- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs @@ -333,7 +333,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC } else { - Console.WriteLine("UNABLE TO REMOVE COMPLETED REQUEST"); + m_log.Error("UNABLE TO REMOVE COMPLETED REQUEST"); } } } -- cgit v1.1