using System; namespace GitConverter.Lib.Logging { /// /// A no-op logger implementation. Safe to use when logging is disabled. /// /// /// - Methods intentionally do nothing and must not throw. /// - Use to avoid allocating multiple empty objects. /// - This class is thread-safe by design (stateless). /// public sealed class NullLogger : IAppLogger { /// /// Shared instance to avoid unnecessary allocations. /// public static readonly NullLogger Instance = new NullLogger(); // Private ctor encourages use of Instance when appropriate. internal NullLogger() { } public void Debug(string message) { /* intentionally no-op */ } public void Info(string message) { /* intentionally no-op */ } public void Warn(string message) { /* intentionally no-op */ } public void Error(string message, Exception ex = null) { /* intentionally no-op */ } } }