aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MySQL
diff options
context:
space:
mode:
authorJeff Ames2008-02-10 01:57:59 +0000
committerJeff Ames2008-02-10 01:57:59 +0000
commite207284fefa60637e35405ebc87e5e151bd2eabd (patch)
tree6e9954502ea44fe8f6327cb65cfd0026c3322578 /OpenSim/Framework/Data.MySQL
parentSet svn:ignore in OpenSim/Tests. (diff)
downloadopensim-SC-e207284fefa60637e35405ebc87e5e151bd2eabd.zip
opensim-SC-e207284fefa60637e35405ebc87e5e151bd2eabd.tar.gz
opensim-SC-e207284fefa60637e35405ebc87e5e151bd2eabd.tar.bz2
opensim-SC-e207284fefa60637e35405ebc87e5e151bd2eabd.tar.xz
Clean up logging calls using String.Format explicitly
Diffstat (limited to 'OpenSim/Framework/Data.MySQL')
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLAssetData.cs14
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLDataStore.cs31
2 files changed, 22 insertions, 23 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
index f9ef699..0dfe671 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
@@ -100,9 +100,9 @@ namespace OpenSim.Framework.Data.MySQL
100 } 100 }
101 catch (Exception e) 101 catch (Exception e)
102 { 102 {
103 m_log.Error(String.Format( 103 m_log.ErrorFormat(
104 "[ASSETS]: MySql failure fetching asset {0}" + Environment.NewLine + e.ToString() 104 "[ASSETS]: MySql failure fetching asset {0}" + Environment.NewLine + e.ToString()
105 + Environment.NewLine + "Attempting reconnection", assetID)); 105 + Environment.NewLine + "Attempting reconnection", assetID);
106 _dbConnection.Reconnect(); 106 _dbConnection.Reconnect();
107 } 107 }
108 } 108 }
@@ -139,10 +139,10 @@ namespace OpenSim.Framework.Data.MySQL
139 } 139 }
140 catch (Exception e) 140 catch (Exception e)
141 { 141 {
142 m_log.Error(String.Format( 142 m_log.ErrorFormat(
143 "[ASSETS]: " + 143 "[ASSETS]: " +
144 "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()
145 + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name)); 145 + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name);
146 _dbConnection.Reconnect(); 146 _dbConnection.Reconnect();
147 } 147 }
148 } 148 }
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
index e2ea018..fcc7cc1 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
@@ -165,7 +165,7 @@ namespace OpenSim.Framework.Data.MySQL
165 165
166 public void RemoveObject(LLUUID obj, LLUUID regionUUID) 166 public void RemoveObject(LLUUID obj, LLUUID regionUUID)
167 { 167 {
168 m_log.Info(String.Format("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID)); 168 m_log.InfoFormat("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID);
169 169
170 DataTable prims = m_primTable; 170 DataTable prims = m_primTable;
171 DataTable shapes = m_shapeTable; 171 DataTable shapes = m_shapeTable;
@@ -304,7 +304,7 @@ namespace OpenSim.Framework.Data.MySQL
304 /// <param name="prim"></param> 304 /// <param name="prim"></param>
305 private void LoadItems(SceneObjectPart prim) 305 private void LoadItems(SceneObjectPart prim)
306 { 306 {
307 //m_log.Info(String.Format("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID)); 307 //m_log.InfoFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID);
308 308
309 DataTable dbItems = m_itemsTable; 309 DataTable dbItems = m_itemsTable;
310 310
@@ -318,7 +318,7 @@ namespace OpenSim.Framework.Data.MySQL
318 TaskInventoryItem item = buildItem(row); 318 TaskInventoryItem item = buildItem(row);
319 inventory.Add(item); 319 inventory.Add(item);
320 320
321 m_log.Info(String.Format("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID)); 321 m_log.InfoFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID);
322 } 322 }
323 323
324 prim.RestoreInventoryItems(inventory); 324 prim.RestoreInventoryItems(inventory);
@@ -1216,7 +1216,7 @@ namespace OpenSim.Framework.Data.MySQL
1216 if (!persistPrimInventories) 1216 if (!persistPrimInventories)
1217 return; 1217 return;
1218 1218
1219 m_log.Info(String.Format("[DATASTORE]: Persisting Prim Inventory with prim ID {0}", primID)); 1219 m_log.InfoFormat("[DATASTORE]: Persisting Prim Inventory with prim ID {0}", primID);
1220 1220
1221 // For now, we're just going to crudely remove all the previous inventory items 1221 // For now, we're just going to crudely remove all the previous inventory items
1222 // no matter whether they have changed or not, and replace them with the current set. 1222 // no matter whether they have changed or not, and replace them with the current set.
@@ -1227,10 +1227,10 @@ namespace OpenSim.Framework.Data.MySQL
1227 // repalce with current inventory details 1227 // repalce with current inventory details
1228 foreach (TaskInventoryItem newItem in items) 1228 foreach (TaskInventoryItem newItem in items)
1229 { 1229 {
1230// m_log.Info(String.Format( 1230// m_log.InfoFormat(
1231// "[DATASTORE]: " + 1231// "[DATASTORE]: " +
1232// "Adding item {0}, {1} to prim ID {2}", 1232// "Adding item {0}, {1} to prim ID {2}",
1233// newItem.Name, newItem.ItemID, newItem.ParentPartID)); 1233// newItem.Name, newItem.ItemID, newItem.ParentPartID);
1234 1234
1235 DataRow newItemRow = m_itemsTable.NewRow(); 1235 DataRow newItemRow = m_itemsTable.NewRow();
1236 fillItemRow(newItemRow, newItem); 1236 fillItemRow(newItemRow, newItem);
@@ -1313,7 +1313,6 @@ namespace OpenSim.Framework.Data.MySQL
1313 return cmd; 1313 return cmd;
1314 } 1314 }
1315 1315
1316
1317 private string defineTable(DataTable dt) 1316 private string defineTable(DataTable dt)
1318 { 1317 {
1319 string sql = "create table " + dt.TableName + "("; 1318 string sql = "create table " + dt.TableName + "(";
@@ -1334,7 +1333,7 @@ namespace OpenSim.Framework.Data.MySQL
1334 sql += subsql; 1333 sql += subsql;
1335 sql += ")"; 1334 sql += ")";
1336 1335
1337 //m_log.Info(String.Format("[DATASTORE]: defineTable() sql {0}", sql)); 1336 //m_log.InfoFormat("[DATASTORE]: defineTable() sql {0}", sql);
1338 1337
1339 return sql; 1338 return sql;
1340 } 1339 }
@@ -1477,7 +1476,7 @@ namespace OpenSim.Framework.Data.MySQL
1477 } 1476 }
1478 catch (MySqlException e) 1477 catch (MySqlException e)
1479 { 1478 {
1480 m_log.Warn(String.Format("[MySql]: Primitives Table Already Exists: {0}", e)); 1479 m_log.WarnFormat("[MySql]: Primitives Table Already Exists: {0}", e);
1481 } 1480 }
1482 1481
1483 try 1482 try
@@ -1486,7 +1485,7 @@ namespace OpenSim.Framework.Data.MySQL
1486 } 1485 }
1487 catch (MySqlException e) 1486 catch (MySqlException e)
1488 { 1487 {
1489 m_log.Warn(String.Format("[MySql]: Shapes Table Already Exists: {0}", e)); 1488 m_log.WarnFormat("[MySql]: Shapes Table Already Exists: {0}", e);
1490 } 1489 }
1491 1490
1492 try 1491 try
@@ -1495,7 +1494,7 @@ namespace OpenSim.Framework.Data.MySQL
1495 } 1494 }
1496 catch (MySqlException e) 1495 catch (MySqlException e)
1497 { 1496 {
1498 m_log.Warn(String.Format("[MySql]: Items Table Already Exists: {0}", e)); 1497 m_log.WarnFormat("[MySql]: Items Table Already Exists: {0}", e);
1499 } 1498 }
1500 1499
1501 try 1500 try
@@ -1504,7 +1503,7 @@ namespace OpenSim.Framework.Data.MySQL
1504 } 1503 }
1505 catch (MySqlException e) 1504 catch (MySqlException e)
1506 { 1505 {
1507 m_log.Warn(String.Format("[MySql]: Terrain Table Already Exists: {0}", e)); 1506 m_log.WarnFormat("[MySql]: Terrain Table Already Exists: {0}", e);
1508 } 1507 }
1509 1508
1510 try 1509 try
@@ -1513,7 +1512,7 @@ namespace OpenSim.Framework.Data.MySQL
1513 } 1512 }
1514 catch (MySqlException e) 1513 catch (MySqlException e)
1515 { 1514 {
1516 m_log.Warn(String.Format("[MySql]: Land Table Already Exists: {0}", e)); 1515 m_log.WarnFormat("[MySql]: Land Table Already Exists: {0}", e);
1517 } 1516 }
1518 1517
1519 try 1518 try
@@ -1522,7 +1521,7 @@ namespace OpenSim.Framework.Data.MySQL
1522 } 1521 }
1523 catch (MySqlException e) 1522 catch (MySqlException e)
1524 { 1523 {
1525 m_log.Warn(String.Format("[MySql]: LandAccessList Table Already Exists: {0}", e)); 1524 m_log.WarnFormat("[MySql]: LandAccessList Table Already Exists: {0}", e);
1526 } 1525 }
1527 conn.Close(); 1526 conn.Close();
1528 } 1527 }