public static IAppender CreateFileAppender(LoggingStore loggingStore, string path) { switch (loggingStore) { case LoggingStore.TextFile: return new TextFileAppender(path); case LoggingStore.DB: return new XmlAppender(path); default: throw new NotSupportedException("Invalid appender type"); } }
public Logger(LoggingStore store, string configuration) { this.Appender = AppenderFactory.CreateFileAppender(store, configuration); }