/// <summary> /// Adds an unbuffered console logger. /// Useful for tests. /// </summary> /// <param name="factory">The <see cref="ILogFactory"/> to use.</param> /// <param name="configure">Optional configuration</param> public static ILogFactory AddUnbufferedConsole( [NotNull] this ILogFactory factory, Action <ConsoleLoggerOptions> configure = null) { var options = new ConsoleLoggerOptions(); configure?.Invoke(options); return(factory.AddConsole(options, ConsoleLogMessageWriter.Instance)); }