mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-16 11:11:39 +00:00
- FileLogSink: thread-safe file writer with AutoFlush, FileShare.Read for concurrent read access (tail -f), automatic parent directory creation, full date-time timestamps, IDisposable for graceful shutdown - CompositeLogSink: fan-out to multiple sinks with per-sink exception isolation (one broken sink cannot silence the others), IDisposable propagates to children - SharpEmuLog: ResolveSinkFromEnvironment() reads SHARPEMU_LOG_FILE and creates CompositeLogSink(console + file) when set; Sink setter now disposes the previous IDisposable sink to prevent file handle leaks; Shutdown() flushes and disposes the active sink - Program.cs: Main wrapped in try/finally to guarantee SharpEmuLog.Shutdown() runs on all exit paths (GUI, mitigated child, normal, exception) Co-authored-by: Hermes Atlas <hermesatlas@example.com>