Example #1
0
 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");
     }
 }
Example #2
0
 public Logger(LoggingStore store, string configuration)
 {
     this.Appender = AppenderFactory.CreateFileAppender(store, configuration);
 }