コード例 #1
0
        /// <summary>
        /// Initialize a new instance of the <see cref="HttpLogging"/> class.
        /// </summary>
        /// <param name="next">A reference to the next OwinMiddleware object in the chain.</param>
        /// <param name="options">A reference to an <see cref="HttpLoggingOptions"/> class.</param>
        public HttpLogging(OwinMiddleware next, HttpLoggingOptions options)
            : base(next)
        {
            HttpLoggingStore = options.TrackingStore;

            if (!string.IsNullOrEmpty(options.TrackingIdPropertyName))
            {
                _trackingIdPropertyName = options.TrackingIdPropertyName;
            }

            _maxRequestLength  = options.MaximumRecordedRequestLength ?? _maxRequestLength;
            _maxResponseLength = options.MaximumRecordedResponseLength ?? _maxResponseLength;
        }
コード例 #2
0
 public static IAppBuilder UseHttpLogging(this IAppBuilder builder, HttpLoggingOptions options)
 {
     return(builder.Use <HttpLogging>(options));
 }