2 using System.Collections.Generic;
5 using MySql.Data.MySqlClient;
9 static protected Database _db = null;
10 static public Database db { get { return _db; } }
12 static protected Logger _log;
13 static public Logger log { get { return _log; } }
16 static void Main(string[] args) {
17 System.IO.StreamWriter fileout = new System.IO.StreamWriter("kelsier.log", false);
18 fileout.AutoFlush = true;
19 System.IO.TextWriter[] outputs = { Console.Out, fileout };
20 _log = new Logger(outputs, outputs, outputs);
22 _db = new Database(Properties.Settings.Default.dbstr);
26 log.debug("1 + 3 = {0}", db.queryScalar("SELECT 1+3").ToString());
30 GC.WaitForPendingFinalizers();
33 Console.Write("Key to end...");