From f3662e3d15073aa7da22c3faf34afd6cb0e19dc9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 30 Apr 2010 22:22:03 +0100 Subject: minor: eliminate more debug Console.WriteLines, convert one to logging instead --- OpenSim/Data/SQLite/SQLiteAuthenticationData.cs | 6 +++++- OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs | 2 +- OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs index 086ac0a..a1412ff 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 3c70aef..9b8e2fa 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 c64830a..760221d 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; } -- cgit v1.1