public static ILog ConfigureFileAppender(this ILog log, String file) { var appender = new FileAppender(); appender.Layout = ILogExtensions.PatternLayout; appender.File = file; appender.ActivateOptions(); log.AddAppender(appender); return(log); }
public static ILog ConfigureManagedColoredConsoleAppender(this ILog log, params ManagedColoredConsoleAppender.LevelColors[] mapping) { var appender = new ManagedColoredConsoleAppender(); appender.Layout = ILogExtensions.PatternLayout; mapping.ForEach(m => appender.AddMapping(m)); appender.ActivateOptions(); log.AddAppender(appender); return(log); }