public ResponseRecordingDecorator( IRestClient innerClient, IResponseLogger responseLogger) { _innerClient = innerClient ?? throw new ArgumentNullException(nameof(innerClient)); _responseLogger = responseLogger ?? throw new ArgumentNullException(nameof(responseLogger)); }
public void Add(IResponseLogger logger) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _loggers.Add(logger); }
protected RequestBase(TConfig config, IResponseLogger logger) { if (config == null) { throw new ArgumentNullException(nameof(config)); } TypedConfig = config; _logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="HttpLogger"/> class. /// </summary> /// <param name="logger">Actual logger instance to use as writer.</param> /// <param name="requestLogger">Request detail logger.</param> /// <param name="responseLogger">Response detail logger.</param> /// <param name="basicInfoLogger">Basic information logger.</param> /// <param name="requestPredicates">Request path predicates to determine is the log message required.</param> public HttpLogger( ILogger logger, IRequestLogger requestLogger, IResponseLogger responseLogger, IBasicInfoLogger basicInfoLogger, IEnumerable <IHttpRequestPredicate> requestPredicates) { _logger = logger; _requestLogger = requestLogger; _responseLogger = responseLogger; _basicInfoLogger = basicInfoLogger; _requestPredicates = requestPredicates; }
public PutRequest(ConfigBase config, IResponseLogger logger) : base(config, logger) { }