Beispiel #1
0
 public static void CheckDatabasePath(IDataBase database, string path, string name)
 {
     CheckAndCreatePath(path);
     if (!System.IO.File.Exists(Path.Combine(path, name)))
     {
         database.Connect(path);
         database.Execute(@"CREATE TABLE NLogX (
                         Id          INTEGER        PRIMARY KEY AUTOINCREMENT,
                         Time        DATETIME,
                         Level       NVARCHAR,
                         Threadname    NVARCHAR,
                         Source      NVARCHAR,
                         SourceDetails      NVARCHAR,
                         Message     NVARCHAR,
                         MessageId   INTEGER,
                         Logger      NVARCHAR,
                         Callsite    NVARCHAR,
                         Exception   NVARCHAR
                         )");
         using (NLogService nLog = new NLogService())
         {
             nLog.Initial();
             nLog.Info("Created database");
         }
     }
 }
 protected override void ConfigureContainer()
 {
     base.ConfigureContainer();
     this.Container.ComposeExportedValue <ILogger>(this.logger);
     logger.Info("NLogService Initialized");
 }