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. --- OpenSim/Data/MySQL/MySQLManager.cs | 2 -- OpenSim/Data/MySQL/Tests/MySQLAssetTest.cs | 7 +++++-- OpenSim/Data/MySQL/Tests/MySQLEstateTest.cs | 5 ++++- OpenSim/Data/MySQL/Tests/MySQLGridTest.cs | 8 ++++++-- OpenSim/Data/MySQL/Tests/MySQLInventoryTest.cs | 5 ++++- OpenSim/Data/MySQL/Tests/MySQLRegionTest.cs | 7 +++++-- OpenSim/Data/MySQL/Tests/MySQLUserTest.cs | 7 +++++-- 7 files changed, 29 insertions(+), 12 deletions(-) (limited to 'OpenSim/Data/MySQL') diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 3bb6857..2f14f16 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs @@ -1030,7 +1030,6 @@ namespace OpenSim.Data.MySQL { IDbCommand result = Query(sql, parameters); - //Console.WriteLine(result.CommandText); // int x; // if ((x = result.ExecuteNonQuery()) > 0) // { @@ -1123,7 +1122,6 @@ namespace OpenSim.Data.MySQL { IDbCommand result = Query(sql, parameters); - //Console.WriteLine(result.CommandText); // int x; // if ((x = result.ExecuteNonQuery()) > 0) // { diff --git a/OpenSim/Data/MySQL/Tests/MySQLAssetTest.cs b/OpenSim/Data/MySQL/Tests/MySQLAssetTest.cs index d03e66c..514e04e 100644 --- a/OpenSim/Data/MySQL/Tests/MySQLAssetTest.cs +++ b/OpenSim/Data/MySQL/Tests/MySQLAssetTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.MySQL.Tests { [TestFixture] public class MySQLAssetTest : BasicAssetTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public MySQLManager database; public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.MySQL.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -73,4 +76,4 @@ namespace OpenSim.Data.MySQL.Tests } } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/MySQL/Tests/MySQLEstateTest.cs b/OpenSim/Data/MySQL/Tests/MySQLEstateTest.cs index f148385..79fcc2d 100644 --- a/OpenSim/Data/MySQL/Tests/MySQLEstateTest.cs +++ b/OpenSim/Data/MySQL/Tests/MySQLEstateTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.MySQL.Tests { [TestFixture] public class MySQLEstateTest : BasicEstateTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public MySQLManager database; public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;"; @@ -56,7 +59,7 @@ namespace OpenSim.Data.MySQL.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error("Exception {0}", e); Assert.Ignore(); } } diff --git a/OpenSim/Data/MySQL/Tests/MySQLGridTest.cs b/OpenSim/Data/MySQL/Tests/MySQLGridTest.cs index 953294f..fd71022 100644 --- a/OpenSim/Data/MySQL/Tests/MySQLGridTest.cs +++ b/OpenSim/Data/MySQL/Tests/MySQLGridTest.cs @@ -28,12 +28,16 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.MySQL.Tests { [TestFixture] public class MySQLGridTest : BasicGridTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + public string file; public MySQLManager database; public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;"; @@ -54,7 +58,7 @@ namespace OpenSim.Data.MySQL.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error("Exception {0}", e); Assert.Ignore(); } } @@ -73,4 +77,4 @@ namespace OpenSim.Data.MySQL.Tests } } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/MySQL/Tests/MySQLInventoryTest.cs b/OpenSim/Data/MySQL/Tests/MySQLInventoryTest.cs index e03e38d..c7799e5 100644 --- a/OpenSim/Data/MySQL/Tests/MySQLInventoryTest.cs +++ b/OpenSim/Data/MySQL/Tests/MySQLInventoryTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.MySQL.Tests { [TestFixture] public class MySQLInventoryTest : BasicInventoryTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public MySQLManager database; public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.MySQL.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error("Exception {0}", e); Assert.Ignore(); } } diff --git a/OpenSim/Data/MySQL/Tests/MySQLRegionTest.cs b/OpenSim/Data/MySQL/Tests/MySQLRegionTest.cs index 5cce53b..77964d3 100644 --- a/OpenSim/Data/MySQL/Tests/MySQLRegionTest.cs +++ b/OpenSim/Data/MySQL/Tests/MySQLRegionTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.MySQL.Tests { [TestFixture] public class MySQLRegionTest : BasicRegionTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public MySQLManager database; public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.MySQL.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error("Exception {0}", e); Assert.Ignore(); } } @@ -87,4 +90,4 @@ namespace OpenSim.Data.MySQL.Tests } } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/MySQL/Tests/MySQLUserTest.cs b/OpenSim/Data/MySQL/Tests/MySQLUserTest.cs index b74617e..449ce4a 100644 --- a/OpenSim/Data/MySQL/Tests/MySQLUserTest.cs +++ b/OpenSim/Data/MySQL/Tests/MySQLUserTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.MySQL.Tests { [TestFixture] public class MySQLUserTest : BasicUserTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public MySQLManager database; public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.MySQL.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error("Exception {0}", e); Assert.Ignore(); } } @@ -78,4 +81,4 @@ namespace OpenSim.Data.MySQL.Tests } } } -} \ No newline at end of file +} -- cgit v1.1