Debug database in debug configuration

This commit is contained in:
Serraniel 2019-02-15 17:11:00 +01:00
parent 9c141e9f5c
commit 0772edd354
Signed by untrusted user who does not match committer: Serraniel
GPG key ID: 3690B4E7364525D3

View file

@ -95,8 +95,12 @@ namespace DML.Application.Classes
logMemory.ArchiveFile = logFile;
}
var databasePath = Path.Combine(DataDirectory, "config.db");
#if DEBUG
databasePath = Path.Combine(DataDirectory, "config.debug.db");
#endif
Logger.Debug("Loading database...");
Database = new LiteDatabase(Path.Combine(DataDirectory, "config.db"));
Database = new LiteDatabase(databasePath);
Database.Log.Logging += (message) => Logger.Trace($"LiteDB: {message}");
Logger.Debug("Loading settings collection out of database...");
@ -277,7 +281,7 @@ namespace DML.Application.Classes
splash.Close();
Logger.Info("Starting scheduler...");
Scheduler.Start();
// Scheduler.Start();
System.Windows.Forms.Application.Run(new MainForm());