aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLAssetData.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
index 407d6d2..f9ef699 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
@@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.MySQL
37{ 37{
38 internal class MySQLAssetData : IAssetProvider 38 internal class MySQLAssetData : IAssetProvider
39 { 39 {
40 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
41
40 private MySQLManager _dbConnection; 42 private MySQLManager _dbConnection;
41 43
42 #region IAssetProvider Members 44 #region IAssetProvider Members
@@ -46,7 +48,7 @@ namespace OpenSim.Framework.Data.MySQL
46 // null as the version, indicates that the table didn't exist 48 // null as the version, indicates that the table didn't exist
47 if (oldVersion == null) 49 if (oldVersion == null)
48 { 50 {
49 MainLog.Instance.Notice("ASSETS", "Creating new database tables"); 51 m_log.Info("[ASSETS]: Creating new database tables");
50 _dbConnection.ExecuteResourceSql("CreateAssetsTable.sql"); 52 _dbConnection.ExecuteResourceSql("CreateAssetsTable.sql");
51 return; 53 return;
52 } 54 }
@@ -98,9 +100,9 @@ namespace OpenSim.Framework.Data.MySQL
98 } 100 }
99 catch (Exception e) 101 catch (Exception e)
100 { 102 {
101 MainLog.Instance.Error( 103 m_log.Error(String.Format(
102 "ASSETS", "MySql failure fetching asset {0}" + Environment.NewLine + e.ToString() 104 "[ASSETS]: MySql failure fetching asset {0}" + Environment.NewLine + e.ToString()
103 + Environment.NewLine + "Attempting reconnection", assetID); 105 + Environment.NewLine + "Attempting reconnection", assetID));
104 _dbConnection.Reconnect(); 106 _dbConnection.Reconnect();
105 } 107 }
106 } 108 }
@@ -137,10 +139,10 @@ namespace OpenSim.Framework.Data.MySQL
137 } 139 }
138 catch (Exception e) 140 catch (Exception e)
139 { 141 {
140 MainLog.Instance.Error( 142 m_log.Error(String.Format(
141 "ASSETS", 143 "[ASSETS]: " +
142 "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString() 144 "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString()
143 + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name); 145 + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name));
144 _dbConnection.Reconnect(); 146 _dbConnection.Reconnect();
145 } 147 }
146 } 148 }