aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-05-28 21:55:50 +0000
committerAdam Frisby2007-05-28 21:55:50 +0000
commit24f613d244f20a504bbff25815c93b7616366ea6 (patch)
tree737bb5a403e17b978f307c790f5141eb31191251 /OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs
parent* Added ILogData interface to Grid.Framework.Data - to be used for saving log... (diff)
downloadopensim-SC_OLD-24f613d244f20a504bbff25815c93b7616366ea6.zip
opensim-SC_OLD-24f613d244f20a504bbff25815c93b7616366ea6.tar.gz
opensim-SC_OLD-24f613d244f20a504bbff25815c93b7616366ea6.tar.bz2
opensim-SC_OLD-24f613d244f20a504bbff25815c93b7616366ea6.tar.xz
Zomg wtf bbq logdata!
Diffstat (limited to 'OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs')
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs
new file mode 100644
index 0000000..f1610ec
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs
@@ -0,0 +1,39 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenGrid.Framework.Data.MySQL
6{
7 class MySQLLogData : ILogData
8 {
9 public MySQLManager database;
10
11 public void Initialise()
12 {
13 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
14 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
15 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
16 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
17 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
18 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
19 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
20
21 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
22 }
23
24 public void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
25 {
26 database.insertLogRow(serverDaemon, target, methodCall, arguments, priority, logMessage);
27 }
28
29 public string getName()
30 {
31 return "MySQL Logdata Interface";
32 }
33
34 public string getVersion()
35 {
36 return "0.1";
37 }
38 }
39}