com.groupbyinc.flux.client.RequestLogger.class Maven / Gradle / Ivy
???? 3, (com/groupbyinc/flux/client/RequestLogger java/lang/Object RequestLogger.java tracer 7Lcom/groupbyinc/flux/common/apache/commons/logging/Log; ()V
this *Lcom/groupbyinc/flux/client/RequestLogger; logResponse ?(Lcom/groupbyinc/flux/common/apache/commons/logging/Log;Lcom/groupbyinc/flux/common/http/client/methods/HttpUriRequest;Lcom/groupbyinc/flux/common/http/HttpHost;Lcom/groupbyinc/flux/common/http/HttpResponse;)V java/io/IOException 5com/groupbyinc/flux/common/apache/commons/logging/Log isDebugEnabled ()Z java/lang/StringBuilder
request [ append -(Ljava/lang/String;)Ljava/lang/StringBuilder;
=com/groupbyinc/flux/common/http/client/methods/HttpUriRequest ! getMethod ()Ljava/lang/String; # $ " % ' -(Ljava/lang/Object;)Ljava/lang/StringBuilder; )
* getRequestLine /()Lcom/groupbyinc/flux/common/http/RequestLine; , - " . getUri A(Lcom/groupbyinc/flux/common/http/RequestLine;)Ljava/lang/String; 0 1
2 ] returned [ 4 ,com/groupbyinc/flux/common/http/HttpResponse 6
getStatusLine .()Lcom/groupbyinc/flux/common/http/StatusLine; 8 9 7 : ] < toString > $
? debug (Ljava/lang/Object;)V A B C
isWarnEnabled E F Warning H
getHeaders =(Ljava/lang/String;)[Lcom/groupbyinc/flux/common/http/Header; J K 7 L buildWarningMessage ?(Lcom/groupbyinc/flux/common/http/client/methods/HttpUriRequest;Lcom/groupbyinc/flux/common/http/HttpHost;[Lcom/groupbyinc/flux/common/http/Header;)Ljava/lang/String; N O
P warn R B S U isTraceEnabled W X buildTraceRequest }(Lcom/groupbyinc/flux/common/http/client/methods/HttpUriRequest;Lcom/groupbyinc/flux/common/http/HttpHost;)Ljava/lang/String; Z [
\ ^ .error while reading request for trace purposes ` trace *(Ljava/lang/Object;Ljava/lang/Throwable;)V b c d java/lang/String f buildTraceResponse B(Lcom/groupbyinc/flux/common/http/HttpResponse;)Ljava/lang/String; h i
j /error while reading response for trace purposes l (C)Ljava/lang/StringBuilder; n
o b B q warnings )[Lcom/groupbyinc/flux/common/http/Header; requestLine Ljava/lang/String; e Ljava/io/IOException; responseLine logger request ?Lcom/groupbyinc/flux/common/http/client/methods/HttpUriRequest; host *Lcom/groupbyinc/flux/common/http/HttpHost; httpResponse .Lcom/groupbyinc/flux/common/http/HttpResponse; logFailedRequest ?(Lcom/groupbyinc/flux/common/apache/commons/logging/Log;Lcom/groupbyinc/flux/common/http/client/methods/HttpUriRequest;Lcom/groupbyinc/flux/client/Node;Ljava/lang/Exception;)V com/groupbyinc/flux/client/Node ? getHost ,()Lcom/groupbyinc/flux/common/http/HttpHost; ? ?
? ? ] failed ? A c ? traceRequest e1 node !Lcom/groupbyinc/flux/client/Node; Ljava/lang/Exception; (Ljava/lang/String;)V ?
? ] returned ? (I)Ljava/lang/StringBuilder; ?
? warnings: ? , ? [ ? &com/groupbyinc/flux/common/http/Header ? getValue ? $ ? ? i I message Ljava/lang/StringBuilder; curl -iX ? ' ? ' ? :com/groupbyinc/flux/common/http/HttpEntityEnclosingRequest ? getEntity .()Lcom/groupbyinc/flux/common/http/HttpEntity; ? ? ? ? -d ' ? *com/groupbyinc/flux/common/http/HttpEntity ? isRepeatable ? ? ? 9com/groupbyinc/flux/common/http/entity/BufferedHttpEntity ? /(Lcom/groupbyinc/flux/common/http/HttpEntity;)V ?
? ? setEntity ? ? ? ? !java/nio/charset/StandardCharsets ? UTF_8 Ljava/nio/charset/Charset; ? ? ? ? 0com/groupbyinc/flux/common/http/util/EntityUtils ? Z(Lcom/groupbyinc/flux/common/http/HttpEntity;Ljava/nio/charset/Charset;)Ljava/lang/String; > ?
? ? entity ,Lcom/groupbyinc/flux/common/http/HttpEntity; enclosingRequest