diff --git a/.vs/LogWriter.git/v16/.suo b/.vs/LogWriter.git/v16/.suo index d73df10..bb1ad9b 100644 Binary files a/.vs/LogWriter.git/v16/.suo and b/.vs/LogWriter.git/v16/.suo differ diff --git a/LogWriter/LogWriter.cs b/LogWriter/LogWriter.cs index db61412..2886a41 100644 --- a/LogWriter/LogWriter.cs +++ b/LogWriter/LogWriter.cs @@ -341,11 +341,25 @@ namespace Eugen.ESystem.IO { if (this.path[this.path.Length - 1] != System.IO.Path.DirectorySeparatorChar) { - fileName = String.Concat(path, System.IO.Path.DirectorySeparatorChar, this.filename, ".log"); + if (String.IsNullOrEmpty(System.IO.Path.GetExtension(this.filename))) + { + fileName = String.Concat(path, System.IO.Path.DirectorySeparatorChar, this.filename, ".log"); + } + else + { + fileName = String.Concat(path, System.IO.Path.DirectorySeparatorChar, this.filename); + } } else { - fileName = String.Concat(this.path, this.filename, ".log"); + if (String.IsNullOrEmpty(System.IO.Path.GetExtension(this.filename))) + { + fileName = String.Concat(this.path, this.filename, ".log"); + } + else + { + fileName = String.Concat(this.path, this.filename); + } } } diff --git a/LogWriter/bin/Debug/helogwri.dll b/LogWriter/bin/Debug/helogwri.dll index 86ffc44..9dd8069 100644 Binary files a/LogWriter/bin/Debug/helogwri.dll and b/LogWriter/bin/Debug/helogwri.dll differ diff --git a/LogWriter/bin/Debug/helogwri.pdb b/LogWriter/bin/Debug/helogwri.pdb index d7a6896..1454d86 100644 Binary files a/LogWriter/bin/Debug/helogwri.pdb and b/LogWriter/bin/Debug/helogwri.pdb differ diff --git a/LogWriter/obj/Debug/helogwri.dll b/LogWriter/obj/Debug/helogwri.dll index 86ffc44..9dd8069 100644 Binary files a/LogWriter/obj/Debug/helogwri.dll and b/LogWriter/obj/Debug/helogwri.dll differ diff --git a/LogWriter/obj/Debug/helogwri.pdb b/LogWriter/obj/Debug/helogwri.pdb index d7a6896..1454d86 100644 Binary files a/LogWriter/obj/Debug/helogwri.pdb and b/LogWriter/obj/Debug/helogwri.pdb differ diff --git a/Test_LogWriter/Form1.cs b/Test_LogWriter/Form1.cs index 6dc49f5..e07afa1 100644 --- a/Test_LogWriter/Form1.cs +++ b/Test_LogWriter/Form1.cs @@ -135,7 +135,7 @@ namespace Test_LogWriter logWriter1.WriteMessage("Das ist ein Test"); //Variante 2 - Logdateiname wird angegeben, z.B. 'my_logfile.log' - var logWriter2 = new LogWriter(@"C:\TMP\", "my_logfile2"); + var logWriter2 = new LogWriter(@"C:\TMP\", "my_logfile2.log"); logWriter2.WriteMessage("Das ist Test 2"); //Variante 3 - Logdateiname wird angegeben und Header wird geschrieben diff --git a/Test_LogWriter/bin/Debug/Test_LogWriter.exe b/Test_LogWriter/bin/Debug/Test_LogWriter.exe index 27dd99e..19f9654 100644 Binary files a/Test_LogWriter/bin/Debug/Test_LogWriter.exe and b/Test_LogWriter/bin/Debug/Test_LogWriter.exe differ diff --git a/Test_LogWriter/bin/Debug/Test_LogWriter.pdb b/Test_LogWriter/bin/Debug/Test_LogWriter.pdb index a4547fe..0ed75d2 100644 Binary files a/Test_LogWriter/bin/Debug/Test_LogWriter.pdb and b/Test_LogWriter/bin/Debug/Test_LogWriter.pdb differ diff --git a/Test_LogWriter/bin/Debug/helogwri.dll b/Test_LogWriter/bin/Debug/helogwri.dll index 86ffc44..9dd8069 100644 Binary files a/Test_LogWriter/bin/Debug/helogwri.dll and b/Test_LogWriter/bin/Debug/helogwri.dll differ diff --git a/Test_LogWriter/bin/Debug/helogwri.pdb b/Test_LogWriter/bin/Debug/helogwri.pdb index d7a6896..1454d86 100644 Binary files a/Test_LogWriter/bin/Debug/helogwri.pdb and b/Test_LogWriter/bin/Debug/helogwri.pdb differ diff --git a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.AssemblyReference.cache b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.AssemblyReference.cache index 5acd535..0bff807 100644 Binary files a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.AssemblyReference.cache and b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.AssemblyReference.cache differ diff --git a/Test_LogWriter/obj/Debug/Test_LogWriter.exe b/Test_LogWriter/obj/Debug/Test_LogWriter.exe index 27dd99e..19f9654 100644 Binary files a/Test_LogWriter/obj/Debug/Test_LogWriter.exe and b/Test_LogWriter/obj/Debug/Test_LogWriter.exe differ diff --git a/Test_LogWriter/obj/Debug/Test_LogWriter.pdb b/Test_LogWriter/obj/Debug/Test_LogWriter.pdb index a4547fe..0ed75d2 100644 Binary files a/Test_LogWriter/obj/Debug/Test_LogWriter.pdb and b/Test_LogWriter/obj/Debug/Test_LogWriter.pdb differ