Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/ApplicationLogger.cs =================================================================== diff -u -r4055 -r4056 --- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/ApplicationLogger.cs (.../ApplicationLogger.cs) (revision 4055) +++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/ApplicationLogger.cs (.../ApplicationLogger.cs) (revision 4056) @@ -23,40 +23,39 @@ using System.Diagnostics; using System.IO; -namespace Deltares.Dam.Data +namespace Deltares.Dam.Data; + +public class ApplicationLogger { - public class ApplicationLogger - { - public const string errorLogExtension = "errorlog.txt"; + public const string errorLogExtension = "errorlog.txt"; - public static StreamWriter AppendErrorLog(string workingPath, Dike dike) + public static StreamWriter AppendErrorLog(string workingPath, Dike dike) + { + StreamWriter errorLog = null; + try { - StreamWriter errorLog = null; - try - { - errorLog = File.AppendText(workingPath + dike.Name + errorLogExtension); - } - catch (Exception e) - { - Trace.Assert(false, "Could not append to errorlog." + e); - } - - return errorLog; + errorLog = File.AppendText(workingPath + dike.Name + errorLogExtension); } - - public static StreamWriter CreateErrorLog(string workingPath, Dike dike) + catch (Exception e) { - StreamWriter errorLog = null; - try - { - errorLog = File.CreateText(workingPath + dike.Name + errorLogExtension); - } - catch (Exception e) - { - Trace.Assert(false, "Could not create errorlog." + e); - } + Trace.Assert(false, "Could not append to errorlog." + e); + } - return errorLog; + return errorLog; + } + + public static StreamWriter CreateErrorLog(string workingPath, Dike dike) + { + StreamWriter errorLog = null; + try + { + errorLog = File.CreateText(workingPath + dike.Name + errorLogExtension); } + catch (Exception e) + { + Trace.Assert(false, "Could not create errorlog." + e); + } + + return errorLog; } } \ No newline at end of file