public RequestLoggingMiddleware( RequestLoggingOptions options, RequestDelegate next) { _next = next ?? throw new ArgumentNullException(nameof(next)); _options = options ?? throw new ArgumentNullException(nameof(options)); }
/// <summary> /// <para>Logs the current HTTP request when enabled.</para> /// </summary> public static IApplicationBuilder UseRequestLogging( this IApplicationBuilder builder, Action <RequestLoggingOptions> configureOptions) { var options = new RequestLoggingOptions(); configureOptions(options); return(builder.UseMiddleware <RequestLoggingMiddleware>(options)); }