Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/CommandOptions.cs =================================================================== diff -u -r3186 -r3189 --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/CommandOptions.cs (.../CommandOptions.cs) (revision 3186) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/CommandOptions.cs (.../CommandOptions.cs) (revision 3189) @@ -40,6 +40,9 @@ [Option("o", "output", Required = false, DefaultValue = DefaultOutputFolder, HelpText = "Name and path of the output folder.")] public string OutputFolderName { get; set; } + [Option("l", "logfile", Required = false, DefaultValue = DefaultOutputFolder, HelpText = "Name of the logfile.")] + public string LogFileName { get; set; } + [HelpOption] public string GetUsage() { @@ -53,7 +56,7 @@ this.HandleParsingErrorsInHelp(help); - help.AddPreOptionsLine("Usage: LayerOnSlopeTool[.exe] -i InputFolder -g GeometriesFolder [ -o OutputFolder]"); + help.AddPreOptionsLine("Usage: LayerOnSlopeTool[.exe] -i InputFolder -g GeometriesFolder [-o OutputFolder] [-l LogFileName"); help.AddOptions(this); return help; Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/LayerCreator.cs =================================================================== diff -u -r3186 -r3189 --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/LayerCreator.cs (.../LayerCreator.cs) (revision 3186) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator/LayerCreator.cs (.../LayerCreator.cs) (revision 3189) @@ -37,18 +37,23 @@ private bool errorFound; private string fullLogFilePath; - public const string LogFile = "LayerOnSlopeTool.log"; + public string LogFileName = "LayerOnSlopeTool.log"; /// Initializes a new instance of the class. /// Name of the input folder. /// Name of the geometries folder. /// Name of the output folder. - public LayerCreator(string inputFolderName, string geometriesFolderName, string outputFolderName) + /// + public LayerCreator(string inputFolderName, string geometriesFolderName, string outputFolderName, string logFileName) { InputFolderName = inputFolderName; GeometriesFolderName = geometriesFolderName; OutputFolderName = outputFolderName; - fullLogFilePath = Path.Combine(OutputFolderName, LogFile); + if (!string.IsNullOrEmpty(logFileName)) + { + LogFileName = logFileName; + } + fullLogFilePath = Path.Combine(OutputFolderName, LogFileName); } /// Gets the name of the output folder. Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator.Tests/LayerCreatorTests.cs =================================================================== diff -u -r3186 -r3189 --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator.Tests/LayerCreatorTests.cs (.../LayerCreatorTests.cs) (revision 3186) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.LayerCreator.Tests/LayerCreatorTests.cs (.../LayerCreatorTests.cs) (revision 3189) @@ -57,7 +57,7 @@ var resultFile = Path.Combine(outputFolder, "111-DIG-8986-01.2.sti"); Assert.IsFalse(File.Exists(resultFile)); - var logFile = Path.Combine(outputFolder, LayerCreator.LogFile); + var logFile = Path.Combine(outputFolder, LayerCreator.LogFileName); Assert.IsTrue(File.Exists(logFile)); var lines =File.ReadAllLines(logFile); Assert.IsTrue(lines.Length == 1); @@ -84,7 +84,7 @@ } var resultFile = Path.Combine(outputFolder, "111-DIG-8986-01.2.sti"); Assert.IsFalse(File.Exists(resultFile)); - var logFile = Path.Combine(outputFolder, LayerCreator.LogFile); + var logFile = Path.Combine(outputFolder, LayerCreator.LogFileName); Assert.IsTrue(File.Exists(logFile)); var lines = File.ReadAllLines(logFile); Assert.IsTrue(lines.Length == 2); @@ -105,7 +105,7 @@ layerCreator.Execute(); var resultFile = Path.Combine(outputFolder, "111-DIG-8986-01.2.sti"); Assert.IsTrue(File.Exists(resultFile)); - var logFile = Path.Combine(outputFolder, LayerCreator.LogFile); + var logFile = Path.Combine(outputFolder, LayerCreator.LogFileName); Assert.IsTrue(File.Exists(logFile)); var lines = File.ReadAllLines(logFile); Assert.IsTrue(lines.Length == 1); Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/Program.cs =================================================================== diff -u -r3186 -r3189 --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/Program.cs (.../Program.cs) (revision 3186) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Application/Program.cs (.../Program.cs) (revision 3189) @@ -39,7 +39,8 @@ var layerCreator = new LayerCreator.LayerCreator( commandLineArguments.InputFolderName, commandLineArguments.GeometriesFolderName, - commandLineArguments.OutputFolderName); + commandLineArguments.OutputFolderName, + commandLineArguments.LogFileName); layerCreator.Execute(); } else