aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.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/MySQLManager.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 '')
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
index ea7e2ac..1f7413f 100644
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
@@ -207,6 +207,39 @@ namespace OpenGrid.Framework.Data.MySQL
207 return retval; 207 return retval;
208 } 208 }
209 209
210 public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
211 {
212 string sql = "INSERT INTO logs (target, server, method, arguments, priority, message) VALUES (";
213 sql += "(?target, ?server, ?method, ?arguments, ?priority, ?message)";
214
215 Dictionary<string, string> parameters = new Dictionary<string, string>();
216 parameters["?server"] = serverDaemon;
217 parameters["?target"] = target;
218 parameters["?method"] = methodCall;
219 parameters["?arguments"] = arguments;
220 parameters["?priority"] = priority.ToString();
221 parameters["?message"] = logMessage;
222
223 bool returnval = false;
224
225 try
226 {
227 IDbCommand result = Query(sql, parameters);
228
229 if (result.ExecuteNonQuery() == 1)
230 returnval = true;
231
232 result.Dispose();
233 }
234 catch (Exception e)
235 {
236 Console.WriteLine(e.ToString());
237 return false;
238 }
239
240 return returnval;
241 }
242
210 public bool insertRow(SimProfileData profile) 243 public bool insertRow(SimProfileData profile)
211 { 244 {
212 string sql = "REPLACE INTO regions (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, "; 245 string sql = "REPLACE INTO regions (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";