Add logging and correct creation of mappings

This commit is contained in:
Matt Nadareski
2016-04-09 04:07:46 -07:00
parent c66e8b032e
commit 9ce5b2ee35

View File

@@ -17,6 +17,7 @@ namespace SabreTools
{ {
private static string _dbName = "Headerer.sqlite"; private static string _dbName = "Headerer.sqlite";
private static string _connectionString = "Data Source=" + _dbName + ";Version = 3;"; private static string _connectionString = "Data Source=" + _dbName + ";Version = 3;";
private static Logger logger;
/// <summary> /// <summary>
/// Possible detected header type /// Possible detected header type
@@ -39,10 +40,13 @@ namespace SabreTools
/// <param name="args">String array representing command line parameters</param> /// <param name="args">String array representing command line parameters</param>
static void Main(string[] args) static void Main(string[] args)
{ {
Console.Title = "Headerer " + Build.Version; // Perform initial setup and verification
logger = new Logger(false, "database.log");
// Ensure that the header database is set up logger.Start();
DBTools.EnsureDatabase(_dbName, _connectionString); DBTools.EnsureDatabase(_dbName, _connectionString);
Remapping.CreateHeaderSkips();
Console.Title = "Headerer " + Build.Version;
if (args.Length == 0 || args.Length > 2) if (args.Length == 0 || args.Length > 2)
{ {