diff --git a/DATFromDir/DATFromDir.cs b/DATFromDir/DATFromDir.cs index a775e3e0..7162214f 100644 --- a/DATFromDir/DATFromDir.cs +++ b/DATFromDir/DATFromDir.cs @@ -33,6 +33,7 @@ namespace SabreTools private static bool _forceunzip; private static bool _allfiles; private static bool _old; + private static bool _log; private static string _name; private static string _desc; private static string _cat; @@ -51,11 +52,9 @@ namespace SabreTools { Console.Clear(); Console.Title = "DATFromDir " + Build.Version; - _logger = new Logger(false, "datfromdir.log"); - _logger.Start(); // First things first, take care of all of the arguments that this could have - _noMD5 = false; _noSHA1 = false; _forceunzip = false; _allfiles = false; _old = false; + _noMD5 = false; _noSHA1 = false; _forceunzip = false; _allfiles = false; _old = false; _log = false; ; _name = ""; _desc = ""; _cat = ""; _version = ""; _author = ""; _basePath = ""; List inputs = new List(); foreach (string arg in args) @@ -92,6 +91,10 @@ namespace SabreTools case "--old": _old = true; break; + case "-l": + case "--log": + _log = true; + break; default: if (arg.StartsWith("-n=") || arg.StartsWith("--name=")) { @@ -121,6 +124,9 @@ namespace SabreTools } } + _logger = new Logger(_log, "datfromdir.log"); + _logger.Start(); + // If there's no inputs, show the help if (inputs.Count == 0) { diff --git a/SabreHelper/Build.cs b/SabreHelper/Build.cs index 777ecbb0..13e5859c 100644 --- a/SabreHelper/Build.cs +++ b/SabreHelper/Build.cs @@ -119,7 +119,8 @@ Options: -d=, --desc= Set the description of the DAT -c=, --cat= Set the category of the DAT -v=, --version= Set the version of the DAT - -a=, --author= Set the author of the DAT"); + -a=, --author= Set the author of the DAT + -l, --log Enable log to file"); break; default: Console.Write("This is the default help output");