diff options
author | Jeff Ames | 2008-02-05 19:44:27 +0000 |
---|---|---|
committer | Jeff Ames | 2008-02-05 19:44:27 +0000 |
commit | 6ed5283bc06a62f38eb517e67b975832b603bf61 (patch) | |
tree | e5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | |
parent | Cut down on the number of packets sent during terraforming. Terraforming shou... (diff) | |
download | opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.zip opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2 opensim-SC-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.SQLite/SQLiteInventoryStore.cs')
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs index 64a27f0..5e5d1e4 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
38 | { | 38 | { |
39 | public class SQLiteInventoryStore : SQLiteBase, IInventoryData | 39 | public class SQLiteInventoryStore : SQLiteBase, IInventoryData |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | private const string invItemsSelect = "select * from inventoryitems"; | 43 | private const string invItemsSelect = "select * from inventoryitems"; |
42 | private const string invFoldersSelect = "select * from inventoryfolders"; | 44 | private const string invFoldersSelect = "select * from inventoryfolders"; |
43 | 45 | ||
@@ -57,7 +59,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
57 | { | 59 | { |
58 | string connectionString = "URI=file:" + dbfile + ",version=3"; | 60 | string connectionString = "URI=file:" + dbfile + ",version=3"; |
59 | 61 | ||
60 | MainLog.Instance.Verbose("Inventory", "Sqlite - connecting: " + dbfile); | 62 | m_log.Info("[Inventory]: Sqlite - connecting: " + dbfile); |
61 | SqliteConnection conn = new SqliteConnection(connectionString); | 63 | SqliteConnection conn = new SqliteConnection(connectionString); |
62 | 64 | ||
63 | TestTables(conn); | 65 | TestTables(conn); |
@@ -74,12 +76,12 @@ namespace OpenSim.Framework.Data.SQLite | |||
74 | ds.Tables.Add(createInventoryFoldersTable()); | 76 | ds.Tables.Add(createInventoryFoldersTable()); |
75 | invFoldersDa.Fill(ds.Tables["inventoryfolders"]); | 77 | invFoldersDa.Fill(ds.Tables["inventoryfolders"]); |
76 | setupFoldersCommands(invFoldersDa, conn); | 78 | setupFoldersCommands(invFoldersDa, conn); |
77 | MainLog.Instance.Verbose("DATASTORE", "Populated Intentory Folders Definitions"); | 79 | m_log.Info("[DATASTORE]: Populated Intentory Folders Definitions"); |
78 | 80 | ||
79 | ds.Tables.Add(createInventoryItemsTable()); | 81 | ds.Tables.Add(createInventoryItemsTable()); |
80 | invItemsDa.Fill(ds.Tables["inventoryitems"]); | 82 | invItemsDa.Fill(ds.Tables["inventoryitems"]); |
81 | setupItemsCommands(invItemsDa, conn); | 83 | setupItemsCommands(invItemsDa, conn); |
82 | MainLog.Instance.Verbose("DATASTORE", "Populated Intentory Items Definitions"); | 84 | m_log.Info("[DATASTORE]: Populated Intentory Items Definitions"); |
83 | 85 | ||
84 | ds.AcceptChanges(); | 86 | ds.AcceptChanges(); |
85 | } | 87 | } |
@@ -603,7 +605,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
603 | } | 605 | } |
604 | catch (SqliteSyntaxException) | 606 | catch (SqliteSyntaxException) |
605 | { | 607 | { |
606 | MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); | 608 | m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating"); |
607 | InitDB(conn); | 609 | InitDB(conn); |
608 | } | 610 | } |
609 | 611 | ||
@@ -614,7 +616,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
614 | { | 616 | { |
615 | if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName)) | 617 | if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName)) |
616 | { | 618 | { |
617 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 619 | m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); |
618 | return false; | 620 | return false; |
619 | } | 621 | } |
620 | } | 622 | } |
@@ -622,7 +624,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
622 | { | 624 | { |
623 | if (! tmpDS.Tables["inventoryfolders"].Columns.Contains(col.ColumnName)) | 625 | if (! tmpDS.Tables["inventoryfolders"].Columns.Contains(col.ColumnName)) |
624 | { | 626 | { |
625 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 627 | m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); |
626 | return false; | 628 | return false; |
627 | } | 629 | } |
628 | } | 630 | } |