diff options
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLLogData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLLogData.cs | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/OpenSim/Data/MySQL/MySQLLogData.cs b/OpenSim/Data/MySQL/MySQLLogData.cs index fee7f2f..f11aec5 100644 --- a/OpenSim/Data/MySQL/MySQLLogData.cs +++ b/OpenSim/Data/MySQL/MySQLLogData.cs | |||
@@ -28,20 +28,34 @@ using System; | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using log4net; | 30 | using log4net; |
31 | using Mono.Addins; | ||
32 | using OpenSim.Framework; | ||
33 | |||
34 | // Only one attribute per assembly. See: *GridData.cs | ||
35 | // [assembly : Addin] | ||
36 | // [assembly : AddinDependency("OpenSim.Data", "0.5")] | ||
31 | 37 | ||
32 | namespace OpenSim.Data.MySQL | 38 | namespace OpenSim.Data.MySQL |
33 | { | 39 | { |
34 | /// <summary> | 40 | /// <summary> |
35 | /// An interface to the log database for MySQL | 41 | /// An interface to the log database for MySQL |
36 | /// </summary> | 42 | /// </summary> |
37 | internal class MySQLLogData : ILogData | 43 | [Extension("/OpenSim/GridLogData")] |
44 | internal class MySQLLogData : ILogDataPlugin | ||
38 | { | 45 | { |
39 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | |||
40 | /// <summary> | 48 | /// <summary> |
41 | /// The database manager | 49 | /// The database manager |
42 | /// </summary> | 50 | /// </summary> |
43 | public MySQLManager database; | 51 | public MySQLManager database; |
44 | 52 | ||
53 | public void Initialise() | ||
54 | { | ||
55 | m_log.Info("[MySQLLogData]: " + Name + " cannot be default-initialized!"); | ||
56 | throw new PluginNotInitialisedException (Name); | ||
57 | } | ||
58 | |||
45 | /// <summary> | 59 | /// <summary> |
46 | /// Artificial constructor called when the plugin is loaded | 60 | /// Artificial constructor called when the plugin is loaded |
47 | /// Uses the obsolete mysql_connection.ini if connect string is empty. | 61 | /// Uses the obsolete mysql_connection.ini if connect string is empty. |
@@ -128,16 +142,16 @@ namespace OpenSim.Data.MySQL | |||
128 | /// Returns the name of this DB provider | 142 | /// Returns the name of this DB provider |
129 | /// </summary> | 143 | /// </summary> |
130 | /// <returns>A string containing the DB provider name</returns> | 144 | /// <returns>A string containing the DB provider name</returns> |
131 | public string getName() | 145 | public string Name |
132 | { | 146 | { |
133 | return "MySQL Logdata Interface"; | 147 | get { return "MySQL Logdata Interface";} |
134 | } | 148 | } |
135 | 149 | ||
136 | /// <summary> | 150 | /// <summary> |
137 | /// Closes the database provider | 151 | /// Closes the database provider |
138 | /// </summary> | 152 | /// </summary> |
139 | /// <remarks>do nothing</remarks> | 153 | /// <remarks>do nothing</remarks> |
140 | public void Close() | 154 | public void Dispose() |
141 | { | 155 | { |
142 | // Do nothing. | 156 | // Do nothing. |
143 | } | 157 | } |
@@ -146,9 +160,9 @@ namespace OpenSim.Data.MySQL | |||
146 | /// Returns the version of this DB provider | 160 | /// Returns the version of this DB provider |
147 | /// </summary> | 161 | /// </summary> |
148 | /// <returns>A string containing the provider version</returns> | 162 | /// <returns>A string containing the provider version</returns> |
149 | public string getVersion() | 163 | public string Version |
150 | { | 164 | { |
151 | return "0.1"; | 165 | get { return "0.1"; } |
152 | } | 166 | } |
153 | } | 167 | } |
154 | } | 168 | } |