次の方法で共有


HttpLoggingEndpointConventionBuilderExtensions.WithHttpLogging<TBuilder> メソッド

定義

HttpLogging ミドルウェアのエンドポイント固有の設定を追加します。

public static TBuilder WithHttpLogging<TBuilder> (this TBuilder builder, Microsoft.AspNetCore.HttpLogging.HttpLoggingFields loggingFields, int? requestBodyLogLimit = default, int? responseBodyLogLimit = default) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member WithHttpLogging : 'Builder * Microsoft.AspNetCore.HttpLogging.HttpLoggingFields * Nullable<int> * Nullable<int> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function WithHttpLogging(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, loggingFields As HttpLoggingFields, Optional requestBodyLogLimit As Nullable(Of Integer) = Nothing, Optional responseBodyLogLimit As Nullable(Of Integer) = Nothing) As TBuilder

型パラメーター

TBuilder

エンドポイント規則ビルダーの種類。

パラメーター

builder
TBuilder

エンドポイント規則ビルダー。

loggingFields
HttpLoggingFields

HttpLoggingFieldsこのエンドポイントに適用する 。

requestBodyLogLimit
Nullable<Int32>

このエンドポイントの を RequestBodyLogLimit 設定します。 の -1 値は、 の RequestBodyLogLimit既定の設定を使用します。

responseBodyLogLimit
Nullable<Int32>

このエンドポイントの を ResponseBodyLogLimit 設定します。 の -1 値は、 の ResponseBodyLogLimit既定の設定を使用します。

戻り値

TBuilder

元の規約ビルダー パラメーター。

例外

または responseBodyLogLimit が 未満0の場合requestBodyLogLimitにスローされます。

適用対象