diff --git a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs index 086ac0a972..a1412ff0fa 100644 --- a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs +++ b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs @@ -29,6 +29,8 @@ using System; using System.Collections; using System.Collections.Generic; using System.Data; +using System.Reflection; +using log4net; using OpenMetaverse; using OpenSim.Framework; using Mono.Data.Sqlite; @@ -37,6 +39,8 @@ namespace OpenSim.Data.SQLite { public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private string m_Realm; private List m_ColumnNames; private int m_LastExpire; @@ -157,7 +161,7 @@ namespace OpenSim.Data.SQLite } catch (Exception e) { - Console.WriteLine(e.ToString()); + m_log.Error("[SQLITE]: Exception storing authentication data", e); //CloseCommand(cmd); return false; } diff --git a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs index 3c70aeffc4..9b8e2fa7f3 100644 --- a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs +++ b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs @@ -59,7 +59,7 @@ namespace OpenSim.Data.SQLite if (!m_initialized) { m_Connection = new SqliteConnection(connectionString); - Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString)); + //Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString)); m_Connection.Open(); if (storeName != String.Empty) diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs index c64830a455..760221d9fe 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs @@ -29,6 +29,8 @@ using System; using System.Collections; using System.Collections.Generic; using System.Data; +using System.Reflection; +using log4net; using OpenMetaverse; using OpenSim.Framework; using Mono.Data.SqliteClient; @@ -37,6 +39,8 @@ namespace OpenSim.Data.SQLiteLegacy { public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private string m_Realm; private List m_ColumnNames; private int m_LastExpire; @@ -162,7 +166,7 @@ namespace OpenSim.Data.SQLiteLegacy } catch (Exception e) { - Console.WriteLine(e.ToString()); + m_log.Error("[SQLITE]: Exception storing authentication data", e); CloseCommand(cmd); return false; }