Erste Version

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 17:26:25 +01:00
co-authored by Claude Opus 5.5
commit b69b9638ff
20 changed files with 1863 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
namespace BSO.Launcher;
/// <summary>Protokoll des Launchers: %LocalAppData%\BSO Launcher\launcher.log (wird beim Start ab 1 MB neu begonnen).</summary>
public static class LauncherLog
{
static readonly object Gate = new();
public static string FilePath => Path.Combine(Settings.Folder, "launcher.log");
public static void Info(string line) => Write("INFO ", line);
public static void Error(string line) => Write("ERROR", line);
static void Write(string level, string line)
{
lock (Gate)
{
try
{
Directory.CreateDirectory(Settings.Folder);
var info = new FileInfo(FilePath);
if (info.Exists && info.Length > 1024 * 1024) info.Delete();
File.AppendAllText(FilePath, $"{DateTime.Now:yyyy-MM-dd HH:mm:ss} {level} {line}{Environment.NewLine}");
}
catch { }
}
}
}