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.
---
.../AgentAssetTransactionsManager.cs | 6 +--
.../AssetTransaction/AssetTransactionModule.cs | 10 ++---
.../Agent/Capabilities/CapabilitiesModule.cs | 8 ++--
.../Agent/TextureDownload/TextureDownloadModule.cs | 2 +-
.../Communications/Local/LocalInterregionComms.cs | 4 +-
.../Communications/REST/RESTInterregionComms.cs | 44 +++++++++++-----------
.../CoreModules/Hypergrid/HGWorldMapModule.cs | 2 +-
.../InterGrid/OpenGridProtocolModule.cs | 4 +-
.../DynamicTexture/DynamicTextureModule.cs | 9 +++--
.../Scripting/LoadImageURL/LoadImageURLModule.cs | 7 +++-
.../Scripting/VectorRender/VectorRenderModule.cs | 8 +++-
.../CoreModules/Scripting/XMLRPC/XMLRPCModule.cs | 2 +-
.../World/Terrain/Effects/CookieCutter.cs | 12 ++++--
.../CoreModules/World/WorldMap/MapImageModule.cs | 2 +-
.../World/WorldMap/TexturedMapTileRenderer.cs | 10 +++--
15 files changed, 73 insertions(+), 57 deletions(-)
(limited to 'OpenSim/Region/CoreModules')
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs
index 3c24b05..312c434 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs
@@ -176,7 +176,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type,
byte[] data, bool storeLocal, bool tempFile)
{
- //System.Console.WriteLine("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
+ //m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
if (((AssetType)type == AssetType.Texture ||
(AssetType)type == AssetType.Sound ||
(AssetType)type == AssetType.TextureTGA ||
@@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
}
}
- //Console.WriteLine("asset upload of " + assetID);
+ //m_log.Debug("asset upload of " + assetID);
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
AssetXferUploader uploader = transactions.RequestXferUploader(transaction);
@@ -216,7 +216,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
///
public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data)
{
- //System.Console.WriteLine("xferID: " + xferID + " packetID: " + packetID + " data!");
+ //m_log.Debug("xferID: " + xferID + " packetID: " + packetID + " data!");
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
transactions.HandleXfer(xferID, packetID, data);
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
index 3fd4a70..0adafd3 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
public AssetTransactionModule()
{
- // System.Console.WriteLine("creating AgentAssetTransactionModule");
+ //m_log.Debug("creating AgentAssetTransactionModule");
}
#region IRegionModule Members
@@ -64,7 +64,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
{
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
{
- // System.Console.WriteLine("initialising AgentAssetTransactionModule");
+ // m_log.Debug("initialising AgentAssetTransactionModule");
RegisteredScenes.Add(scene.RegionInfo.RegionID, scene);
scene.RegisterModuleInterface(this);
@@ -237,7 +237,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type,
byte[] data, bool storeLocal, bool tempFile)
{
- //System.Console.WriteLine("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
+ //m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
if (((AssetType)type == AssetType.Texture ||
(AssetType)type == AssetType.Sound ||
(AssetType)type == AssetType.TextureTGA ||
@@ -257,7 +257,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
}
}
- //Console.WriteLine("asset upload of " + assetID);
+ //m_log.Debug("asset upload of " + assetID);
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
AssetXferUploader uploader = transactions.RequestXferUploader(transaction);
@@ -277,7 +277,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
///
public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data)
{
- //System.Console.WriteLine("xferID: " + xferID + " packetID: " + packetID + " data!");
+ //m_log.Debug("xferID: " + xferID + " packetID: " + packetID + " data!");
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
transactions.HandleXfer(xferID, packetID, data);
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
index 2c6b51d..39dd84f 100644
--- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
@@ -188,21 +188,21 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
public void SetChildrenSeed(UUID agentID, Dictionary seeds)
{
- //Console.WriteLine(" !!! Setting child seeds in {0} to {1}", RegionInfo.RegionName, value.Count);
+ //m_log.Debug(" !!! Setting child seeds in {0} to {1}", RegionInfo.RegionName, value.Count);
childrenSeeds[agentID] = seeds;
}
public void DumpChildrenSeeds(UUID agentID)
{
- Console.WriteLine("================ ChildrenSeed {0} ================", m_scene.RegionInfo.RegionName);
+ m_log.Info("================ ChildrenSeed "+m_scene.RegionInfo.RegionName+" ================");
foreach (KeyValuePair kvp in childrenSeeds[agentID])
{
uint x, y;
Utils.LongToUInts(kvp.Key, out x, out y);
x = x / Constants.RegionSize;
y = y / Constants.RegionSize;
- Console.WriteLine(" >> {0}, {1}: {2}", x, y, kvp.Value);
+ m_log.Info(" >> "+x+", "+y+": "+kvp.Value);
}
}
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs
index 4bfa18f..124f0f6 100644
--- a/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
{
if (m_scene == null)
{
- //Console.WriteLine("Creating Texture download module");
+ //m_log.Debug("Creating Texture download module");
m_scene = scene;
m_thread = new Thread(new ThreadStart(ProcessTextureSenders));
m_thread.Name = "ProcessTextureSenderThread";
diff --git a/OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs b/OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs
index 317a935..aa33982 100644
--- a/OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs
+++ b/OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs
@@ -168,7 +168,7 @@ namespace OpenSim.Region.CoreModules.Communications.Local
//Utils.LongToUInts(regionHandle, out x, out y);
//x = x / Constants.RegionSize;
//y = y / Constants.RegionSize;
- //Console.WriteLine("\n >>> Local SendReleaseAgent " + x + "-" + y);
+ //m_log.Debug("\n >>> Local SendReleaseAgent " + x + "-" + y);
foreach (Scene s in m_sceneList)
{
if (s.RegionInfo.RegionHandle == regionHandle)
@@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.Communications.Local
//Utils.LongToUInts(regionHandle, out x, out y);
//x = x / Constants.RegionSize;
//y = y / Constants.RegionSize;
- //Console.WriteLine("\n >>> Local SendCloseAgent " + x + "-" + y);
+ //m_log.Debug("\n >>> Local SendCloseAgent " + x + "-" + y);
foreach (Scene s in m_sceneList)
{
if (s.RegionInfo.RegionHandle == regionHandle)
diff --git a/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs
index 593d621..b19f0fa 100644
--- a/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs
+++ b/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs
@@ -273,7 +273,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
// Eventually, we want to use a caps url instead of the agentID
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + aCircuit.AgentID + "/";
- //Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
+ //m_log.Debug(" >>> DoCreateChildAgentCall <<< " + uri);
WebRequest AgentCreateRequest = WebRequest.Create(uri);
AgentCreateRequest.Method = "POST";
@@ -358,7 +358,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
// Eventually, we want to use a caps url instead of the agentID
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + cAgentData.AgentID + "/";
- //Console.WriteLine(" >>> DoChildAgentUpdateCall <<< " + uri);
+ //m_log.Debug(" >>> DoChildAgentUpdateCall <<< " + uri);
WebRequest ChildUpdateRequest = WebRequest.Create(uri);
ChildUpdateRequest.Method = "PUT";
@@ -440,7 +440,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
protected bool DoReleaseAgentCall(ulong regionHandle, UUID id, string uri)
{
- //Console.WriteLine(" >>> DoReleaseAgentCall <<< " + uri);
+ //m_log.Debug(" >>> DoReleaseAgentCall <<< " + uri);
WebRequest request = WebRequest.Create(uri);
request.Method = "DELETE";
@@ -474,7 +474,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + id + "/" + region.RegionHandle.ToString() +"/";
- //Console.WriteLine(" >>> DoCloseAgentCall <<< " + uri);
+ //m_log.Debug(" >>> DoCloseAgentCall <<< " + uri);
WebRequest request = WebRequest.Create(uri);
request.Method = "DELETE";
@@ -508,7 +508,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
ulong regionHandle = GetRegionHandle(region.RegionHandle);
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/object/" + sog.UUID + "/" + regionHandle.ToString() + "/";
- //Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
+ //m_log.Debug(" >>> DoCreateChildAgentCall <<< " + uri);
WebRequest ObjectCreateRequest = WebRequest.Create(uri);
ObjectCreateRequest.Method = "POST";
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
protected bool DoHelloNeighbourCall(RegionInfo region, RegionInfo thisRegion)
{
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/region/" + thisRegion.RegionID + "/";
- //Console.WriteLine(" >>> DoHelloNeighbourCall <<< " + uri);
+ //m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri);
WebRequest HelloNeighbourRequest = WebRequest.Create(uri);
HelloNeighbourRequest.Method = "POST";
@@ -681,11 +681,11 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
//m_log.Debug("[CONNECTION DEBUGGING]: AgentHandler Called");
- //Console.WriteLine("---------------------------");
- //Console.WriteLine(" >> uri=" + request["uri"]);
- //Console.WriteLine(" >> content-type=" + request["content-type"]);
- //Console.WriteLine(" >> http-method=" + request["http-method"]);
- //Console.WriteLine("---------------------------\n");
+ //m_log.Debug("---------------------------");
+ //m_log.Debug(" >> uri=" + request["uri"]);
+ //m_log.Debug(" >> content-type=" + request["content-type"]);
+ //m_log.Debug(" >> http-method=" + request["http-method"]);
+ //m_log.Debug("---------------------------\n");
Hashtable responsedata = new Hashtable();
responsedata["content_type"] = "text/html";
@@ -833,7 +833,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
protected virtual void DoAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, ulong regionHandle)
{
- //Console.WriteLine(" >>> DoDelete action:" + action + "; regionHandle:" + regionHandle);
+ //m_log.Debug(" >>> DoDelete action:" + action + "; regionHandle:" + regionHandle);
if (action.Equals("release"))
m_localBackend.SendReleaseAgent(regionHandle, id, "");
@@ -852,11 +852,11 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
//m_log.Debug("[CONNECTION DEBUGGING]: ObjectHandler Called");
- //Console.WriteLine("---------------------------");
- //Console.WriteLine(" >> uri=" + request["uri"]);
- //Console.WriteLine(" >> content-type=" + request["content-type"]);
- //Console.WriteLine(" >> http-method=" + request["http-method"]);
- //Console.WriteLine("---------------------------\n");
+ //m_log.Debug("---------------------------");
+ //m_log.Debug(" >> uri=" + request["uri"]);
+ //m_log.Debug(" >> content-type=" + request["content-type"]);
+ //m_log.Debug(" >> http-method=" + request["http-method"]);
+ //m_log.Debug("---------------------------\n");
Hashtable responsedata = new Hashtable();
responsedata["content_type"] = "text/html";
@@ -964,11 +964,11 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
//m_log.Debug("[CONNECTION DEBUGGING]: RegionHandler Called");
- //Console.WriteLine("---------------------------");
- //Console.WriteLine(" >> uri=" + request["uri"]);
- //Console.WriteLine(" >> content-type=" + request["content-type"]);
- //Console.WriteLine(" >> http-method=" + request["http-method"]);
- //Console.WriteLine("---------------------------\n");
+ //m_log.Debug("---------------------------");
+ //m_log.Debug(" >> uri=" + request["uri"]);
+ //m_log.Debug(" >> content-type=" + request["content-type"]);
+ //m_log.Debug(" >> http-method=" + request["http-method"]);
+ //m_log.Debug("---------------------------\n");
Hashtable responsedata = new Hashtable();
responsedata["content_type"] = "text/html";
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
index c1fe5c7..203ab32 100644
--- a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
@@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
//m_scene.ForEachScenePresence(delegate (ScenePresence sp) {
// if (!sp.IsChildAgent && sp.UUID == remoteClient.AgentId)
// {
- // Console.WriteLine("XXX Root agent");
+ // m_log.Debug("XXX Root agent");
// DoRequestMapBlocks(remoteClient, minX, minY, maxX, maxY, flag);
// }
//};
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
index c9a63bd..8065f42 100644
--- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
@@ -375,7 +375,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
public OSD RequestRezAvatarMethod(string path, OSD request)
{
- //System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString());
+ //m_log.Debug("[REQUESTREZAVATAR]: " + request.ToString());
OSDMap requestMap = (OSDMap)request;
@@ -602,7 +602,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
}
}
- //System.Console.WriteLine("Response:" + responseMap.ToString());
+ //m_log.Debug("Response:" + responseMap.ToString());
return responseMap;
}
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");
}
}
}
diff --git a/OpenSim/Region/CoreModules/World/Terrain/Effects/CookieCutter.cs b/OpenSim/Region/CoreModules/World/Terrain/Effects/CookieCutter.cs
index 1824231..58b02f9 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/Effects/CookieCutter.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/Effects/CookieCutter.cs
@@ -28,11 +28,15 @@ using System;
using OpenSim.Region.CoreModules.World.Terrain.PaintBrushes;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
+using log4net;
+using System.Reflection;
namespace OpenSim.Region.CoreModules.World.Terrain.Effects
{
internal class CookieCutter : ITerrainEffect
{
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
#region ITerrainEffect Members
public void RunEffect(ITerrainChannel map)
@@ -44,7 +48,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects
bool[,] smoothMask = new bool[map.Width,map.Height];
bool[,] allowMask = new bool[map.Width,map.Height];
- Console.WriteLine("S1");
+ m_log.Info("S1");
// Step one, generate rough mask
int x, y;
@@ -52,7 +56,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects
{
for (y = 0; y < map.Height; y++)
{
- Console.Write(".");
+ m_log.Info(".");
smoothMask[x, y] = true;
allowMask[x,y] = true;
@@ -71,10 +75,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects
}
}
- Console.WriteLine("S2");
+ m_log.Info("S2");
//smooth.FloodEffect(map, smoothMask, 4.0);
- Console.WriteLine("S3");
+ m_log.Info("S3");
for (x = 0; x < map.Width; x++)
{
for (y = 0; y < map.Height; y++)
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs
index b091c60..5b28430 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
}
catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke
{
- Console.WriteLine("Failed generating terrain map: " + e);
+ m_log.Error("Failed generating terrain map: " + e);
}
return imageData;
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
index 8f61af7..1ab8e26 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
@@ -40,6 +40,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
{
// Hue, Saturation, Value; used for color-interpolation
struct HSV {
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
public float h;
public float s;
public float v;
@@ -76,10 +78,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
// (for info about algorithm, see http://en.wikipedia.org/wiki/HSL_and_HSV)
public Color toColor()
{
- if (s < 0f) Console.WriteLine("S < 0: " + s);
- else if (s > 1f) Console.WriteLine("S > 1: " + s);
- if (v < 0f) Console.WriteLine("V < 0: " + v);
- else if (v > 1f) Console.WriteLine("V > 1: " + v);
+ if (s < 0f) m_log.Debug("S < 0: " + s);
+ else if (s > 1f) m_log.Debug("S > 1: " + s);
+ if (v < 0f) m_log.Debug("V < 0: " + v);
+ else if (v > 1f) m_log.Debug("V > 1: " + v);
float f = h / 60f;
int sector = (int)f % 6;
--
cgit v1.1