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/NHibernate/Tests/NHibernateMsSqlAssetTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs | 5 ++++- OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs | 5 ++++- OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs | 5 ++++- OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs | 5 ++++- OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs | 5 ++++- OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs | 7 +++++-- .../Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs | 5 ++++- OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs | 5 ++++- OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs | 5 ++++- OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs | 7 +++++-- OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs | 8 ++++++-- 24 files changed, 113 insertions(+), 40 deletions(-) (limited to 'OpenSim/Data/NHibernate') diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs index ace7e44..2c3980b 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateMsSqlAssetTest : BasicAssetTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; @@ -55,7 +58,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -74,4 +77,4 @@ namespace OpenSim.Data.NHibernate.Tests } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs index a44936b..7308a0e 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateMsSqlEstateTest : BasicEstateTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; @@ -55,7 +58,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs index bb62b6f..2768a9e 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateMsSqlGridTest : BasicGridTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -72,4 +75,4 @@ namespace OpenSim.Data.NHibernate.Tests } } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs index 6fc8abf..41c0957 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateMsSqlInventoryTest : BasicInventoryTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs index 4d0e64d..beff3b9 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateMsSqlRegionTest : BasicRegionTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; @@ -55,7 +58,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -74,4 +77,4 @@ namespace OpenSim.Data.NHibernate.Tests } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs index 19fd248..b09cbe6 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateMsSqlUserTest : BasicUserTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -72,4 +75,4 @@ namespace OpenSim.Data.NHibernate.Tests } } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs index 8bec0d3..17c65d6 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateMySQLAssetTest : BasicAssetTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -73,4 +76,4 @@ namespace OpenSim.Data.NHibernate.Tests } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs index 4c966f5..6f5ed5f 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateMySQLGridTest : BasicGridTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -72,4 +75,4 @@ namespace OpenSim.Data.NHibernate.Tests } } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs index 7f2ee4a..a7f5f5a 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateMySQLInventoryTest : BasicInventoryTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs index fa484a3..33faea6 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateMySQLRegionTest : BasicRegionTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; @@ -55,7 +58,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -74,4 +77,4 @@ namespace OpenSim.Data.NHibernate.Tests } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs index c316bd4..5554229 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateMySQLUserTest : BasicUserTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -72,4 +75,4 @@ namespace OpenSim.Data.NHibernate.Tests } } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs index 939f1e9..86b9df6 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateMySQLEstateTest : BasicEstateTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs index 6f86b0f..b51389a 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernatePostgreSQLAssetTest : BasicAssetTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -73,4 +76,4 @@ namespace OpenSim.Data.NHibernate.Tests } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs index c0a76e7..1edf20a 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernatePostgreSQLEstateTest : BasicEstateTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs index 084de85..a47830d 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernatePostgreSQLGridTest : BasicGridTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -72,4 +75,4 @@ namespace OpenSim.Data.NHibernate.Tests } } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs index 869d24f..6016303 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernatePostgreSQLInventoryTest : BasicInventoryTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs index 0e4fc82..8b4a8f5 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernatePostgreSQLRegionTest : BasicRegionTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -73,4 +76,4 @@ namespace OpenSim.Data.NHibernate.Tests } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs index ffcb176..13d6c69 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs @@ -28,12 +28,15 @@ using System; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernatePostgreSQLUserTest : BasicUserTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; @@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -72,4 +75,4 @@ namespace OpenSim.Data.NHibernate.Tests } } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs index 1f98949..e89a14e 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs @@ -29,12 +29,15 @@ using System; using System.IO; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateSQLiteAssetTest : BasicAssetTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; @@ -56,7 +59,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -75,4 +78,4 @@ namespace OpenSim.Data.NHibernate.Tests } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs index b51bff2..23fac9a 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs @@ -29,12 +29,15 @@ using System; using System.IO; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateSQLiteEstateTest : BasicEstateTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; @@ -56,7 +59,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs index b9fe8b9..2c3d4de 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs @@ -29,12 +29,15 @@ using System; using System.IO; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateSQLiteGridTest : BasicGridTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; public string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; @@ -55,7 +58,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -73,4 +76,4 @@ namespace OpenSim.Data.NHibernate.Tests } } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs index f31fc5b..adccd12 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs @@ -29,12 +29,15 @@ using System; using System.IO; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateSQLiteInventoryTest : BasicInventoryTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; @@ -56,7 +59,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs index d902dfd..83f4d36 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs @@ -29,12 +29,15 @@ using System; using System.IO; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { [TestFixture] public class NHibernateSQLiteRegionTest : BasicRegionTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; @@ -56,7 +59,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -75,4 +78,4 @@ namespace OpenSim.Data.NHibernate.Tests } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs index 78ab00f..a742c8e 100644 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs +++ b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs @@ -29,12 +29,16 @@ using System; using System.IO; using NUnit.Framework; using OpenSim.Data.Tests; +using log4net; +using System.Reflection; namespace OpenSim.Data.NHibernate.Tests { + [TestFixture] public class NHibernateSQLiteUserTest : BasicUserTest { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string file; public NHibernateManager database; @@ -56,7 +60,7 @@ namespace OpenSim.Data.NHibernate.Tests } catch (Exception e) { - Console.WriteLine("Exception {0}", e); + m_log.Error(e.ToString()); Assert.Ignore(); } } @@ -74,4 +78,4 @@ namespace OpenSim.Data.NHibernate.Tests } } } -} \ No newline at end of file +} -- cgit v1.1