aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
diff options
context:
space:
mode:
authorJeff Ames2008-02-05 19:44:27 +0000
committerJeff Ames2008-02-05 19:44:27 +0000
commit6ed5283bc06a62f38eb517e67b975832b603bf61 (patch)
treee5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
parentCut down on the number of packets sent during terraforming. Terraforming shou... (diff)
downloadopensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.zip
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O. This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to 'OpenSim/Framework/Data.MySQL/MySQLAssetData.cs')
-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 }