mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Logging overhaul!
This change brings about a few changes: 1) A new LogLevel called "User" that is used for non-verbose, non-error output 2) Only User and Error are output to console now, not all of them 3) All programs have log to file enabled by default and all flags for enabling logging have been removed 4) Some former Verbose statements have been converted over to User because of the shift in usage.
This commit is contained in:
@@ -58,7 +58,7 @@ namespace SabreTools
|
||||
/// <returns>True if the data could be inserted or updated correctly, false otherwise</returns>
|
||||
public bool ImportData()
|
||||
{
|
||||
_logger.Log("Beginning import/update process");
|
||||
_logger.User("Beginning import/update process");
|
||||
using (SqliteConnection dbc = new SqliteConnection(_connectionString))
|
||||
{
|
||||
dbc.Open();
|
||||
@@ -88,7 +88,7 @@ namespace SabreTools
|
||||
string system = _datroot + Path.DirectorySeparatorChar + sldr.GetString(1) + " - " + sldr.GetString(2);
|
||||
system = system.Trim();
|
||||
|
||||
_logger.Log("System: " + system.Remove(0, 5));
|
||||
_logger.User("System: " + system.Remove(0, 5));
|
||||
|
||||
// Audit all DATs in the folder
|
||||
foreach (string file in Directory.GetFiles(system, "*", SearchOption.AllDirectories))
|
||||
@@ -246,7 +246,7 @@ VALUES (" + hashid + ", 'source', '" + sourceid + @"'),
|
||||
}
|
||||
}
|
||||
|
||||
_logger.Log("Import/update process complete!");
|
||||
_logger.User("Import/update process complete!");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user