using System; namespace GisConverter.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(object? message) { /* intentionally no-op */ } public void Info(object? message) { /* intentionally no-op */ } public void Warn(object? message) { /* intentionally no-op */ } public void Error(object? message, Exception? ex = null) { /* intentionally no-op */ } } }