mirror of https://github.com/apache/jclouds.git
Issue 471: revised to include java context on interrupted errors
This commit is contained in:
parent
54ea98ba49
commit
72768c206d
|
@ -248,7 +248,7 @@ public class HttpRequest extends HttpMessage {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[method=" + method + ", endpoint=" + endpoint + ", headers=" + headers + ", payload=" + payload + "]";
|
||||
return String.format("[method=%s, endpoint=%s, headers=%s, payload=%s]", method, endpoint, headers, payload);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ import javax.annotation.Resource;
|
|||
import javax.inject.Inject;
|
||||
|
||||
import org.jclouds.logging.Logger;
|
||||
import org.jclouds.rest.internal.GeneratedHttpRequest;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
|
@ -146,6 +147,11 @@ public class TransformingHttpCommandImpl<T> implements TransformingHttpCommand<T
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (request instanceof GeneratedHttpRequest<?>)
|
||||
return String.format("[method=%s.%s, request=%s]", GeneratedHttpRequest.class.cast(request).getDeclaring()
|
||||
.getSimpleName(), GeneratedHttpRequest.class.cast(request).getJavaMethod().getName(), request
|
||||
.getRequestLine());
|
||||
else
|
||||
return "[request=" + request.getRequestLine() + "]";
|
||||
}
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ public abstract class BaseHttpCommandExecutorService<Q> implements HttpCommandEx
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[command=" + command + "]";
|
||||
return command.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue