C# Logging design: Extension method, alternatives?
I'd like to write a logger that can be easily appended to any class in my current project. For development, it will be convenient to log messages to the console, whereas in the final release I'd like to log to a file or something. One should be able to change the behavior by editing just a few lines of code, or ideally a settings file. What I have so far is this class structure: public interface ILogger { void LogMessage(String message); // ... other logging functions (exceptions, time etc.) don't matter here }; public interface ILoggable { }; public static class LoggingProvider { private