/// <summary> /// Use Log4Net for logging with your own appender type, initializing it as necessary. /// Will call 'ActivateOptions()' on the appender for you. /// If you don't specify a threshold, will default to Level.Debug. /// If you don't specify layout, uses this as a default: %d [%t] %-5p %c [%x] <%X{auth}> - %m%n /// </summary> public static Configure Log4Net <TAppender>(this Configure config, Action <TAppender> initializeAppender) where TAppender : new() { var appender = new TAppender(); initializeAppender(appender); return(config.Log4Net(appender)); }
/// <summary> /// Use Log4Net for logging with the Console Appender at the level of All. /// </summary> public static Configure Log4Net(this Configure config) { return(config.Log4Net <ConsoleAppender>(ca => ca.Threshold = Level.All)); }
/// <summary> /// Use Log4Net for logging with the Console Appender at the level of All. /// </summary> public static Configure Log4Net(this Configure config) { var appender = Logging.Loggers.Log4NetAdapter.Log4NetAppenderFactory.CreateConsoleAppender("All"); return(config.Log4Net(appender)); }