aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/MSSQLLogData.cs
diff options
context:
space:
mode:
authorMike Mazur2008-07-18 04:51:41 +0000
committerMike Mazur2008-07-18 04:51:41 +0000
commite0e0db366061eae148364e3d5670f275b1ab25b7 (patch)
treecbd4890958aa28a3ff98a917909ec77247a80d00 /OpenSim/Data/MSSQL/MSSQLLogData.cs
parentMake scripts LSL compliant. (diff)
downloadopensim-SC_OLD-e0e0db366061eae148364e3d5670f275b1ab25b7.zip
opensim-SC_OLD-e0e0db366061eae148364e3d5670f275b1ab25b7.tar.gz
opensim-SC_OLD-e0e0db366061eae148364e3d5670f275b1ab25b7.tar.bz2
opensim-SC_OLD-e0e0db366061eae148364e3d5670f275b1ab25b7.tar.xz
Thanks, sempuki, for a patch that moves all grid plugins to new PluginLoader (issue 1763).
Diffstat (limited to 'OpenSim/Data/MSSQL/MSSQLLogData.cs')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLLogData.cs30
1 files changed, 24 insertions, 6 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLLogData.cs b/OpenSim/Data/MSSQL/MSSQLLogData.cs
index 849d0fb..d0d81b6 100644
--- a/OpenSim/Data/MSSQL/MSSQLLogData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLLogData.cs
@@ -25,21 +25,39 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
29using System.Reflection;
28using System.Collections.Generic; 30using System.Collections.Generic;
29using System.Data; 31using System.Data;
32using log4net;
33using Mono.Addins;
34using OpenSim.Framework;
35
36// Only one attribute per assembly. See: *GridData.cs
37// [assembly : Addin]
38// [assembly : AddinDependency("OpenSim.Data", "0.5")]
30 39
31namespace OpenSim.Data.MSSQL 40namespace OpenSim.Data.MSSQL
32{ 41{
33 /// <summary> 42 /// <summary>
34 /// An interface to the log database for MSSQL 43 /// An interface to the log database for MSSQL
35 /// </summary> 44 /// </summary>
36 internal class MSSQLLogData : ILogData 45 [Extension("/OpenSim/GridLogData")]
46 internal class MSSQLLogData : ILogDataPlugin
37 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49
38 /// <summary> 50 /// <summary>
39 /// The database manager 51 /// The database manager
40 /// </summary> 52 /// </summary>
41 public MSSQLManager database; 53 public MSSQLManager database;
42 54
55 public void Initialise()
56 {
57 m_log.Info("[MSSQLLogData]: " + Name + " cannot be default-initialized!");
58 throw new PluginNotInitialisedException (Name);
59 }
60
43 /// <summary> 61 /// <summary>
44 /// Artificial constructor called when the plugin is loaded 62 /// Artificial constructor called when the plugin is loaded
45 /// </summary> 63 /// </summary>
@@ -97,15 +115,15 @@ namespace OpenSim.Data.MSSQL
97 /// Returns the name of this DB provider 115 /// Returns the name of this DB provider
98 /// </summary> 116 /// </summary>
99 /// <returns>A string containing the DB provider name</returns> 117 /// <returns>A string containing the DB provider name</returns>
100 public string getName() 118 public string Name
101 { 119 {
102 return "MSSQL Logdata Interface"; 120 get { return "MSSQL Logdata Interface"; }
103 } 121 }
104 122
105 /// <summary> 123 /// <summary>
106 /// Closes the database provider 124 /// Closes the database provider
107 /// </summary> 125 /// </summary>
108 public void Close() 126 public void Dispose()
109 { 127 {
110 // Do nothing. 128 // Do nothing.
111 } 129 }
@@ -114,9 +132,9 @@ namespace OpenSim.Data.MSSQL
114 /// Returns the version of this DB provider 132 /// Returns the version of this DB provider
115 /// </summary> 133 /// </summary>
116 /// <returns>A string containing the provider version</returns> 134 /// <returns>A string containing the provider version</returns>
117 public string getVersion() 135 public string Version
118 { 136 {
119 return "0.1"; 137 get { return "0.1"; }
120 } 138 }
121 } 139 }
122} 140}