aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/core/rest.scala
diff options
context:
space:
mode:
authorStewart Stewart <stewinsalot@gmail.com>2017-04-03 11:54:55 -0700
committerStewart Stewart <stewinsalot@gmail.com>2017-04-03 11:54:55 -0700
commit18b978b49649faf15ccb7c3a1f28c61d68bae20a (patch)
treea5058ccd44e673f9f4cb999bcc012b45cc3f88ce /src/main/scala/xyz/driver/core/rest.scala
parent5831ed23235daccc773362bfb5bb5dda70f7dc1b (diff)
parent0ed008ab290074eae0f11fa0149a736e8abd7064 (diff)
downloaddriver-core-18b978b49649faf15ccb7c3a1f28c61d68bae20a.tar.gz
driver-core-18b978b49649faf15ccb7c3a1f28c61d68bae20a.tar.bz2
driver-core-18b978b49649faf15ccb7c3a1f28c61d68bae20a.zip
Merge branch 'master' of github.com:drivergroup/driver-core
Diffstat (limited to 'src/main/scala/xyz/driver/core/rest.scala')
-rw-r--r--src/main/scala/xyz/driver/core/rest.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/xyz/driver/core/rest.scala b/src/main/scala/xyz/driver/core/rest.scala
index b3a9116..29c965c 100644
--- a/src/main/scala/xyz/driver/core/rest.scala
+++ b/src/main/scala/xyz/driver/core/rest.scala
@@ -277,7 +277,7 @@ package rest {
RawHeader(h._1, h._2): HttpHeader
}: _*)
- log.audit(s"Sending to ${request.uri} request $request with tracking id ${context.trackingId}")
+ log.audit(s"Sending request to ${request.method} ${request.uri}")
val response = Http()(actorSystem).singleRequest(request)(materializer)
@@ -289,8 +289,8 @@ package rest {
case Failure(t: Throwable) =>
val responseTime = time.currentTime()
- log.audit(s"Failed to receive response from ${request.uri} to request $requestStub", t)
- log.error(s"Failed to receive response from ${request.uri} to request $requestStub", t)
+ log.audit(s"Failed to receive response from ${request.method} ${request.uri}", t)
+ log.error(s"Failed to receive response from ${request.method} ${request.uri}", t)
stats.recordStats(Seq("request", request.uri.toString, "fail"), TimeRange(requestTime, responseTime), 1)
}(executionContext)
@@ -303,7 +303,7 @@ package rest {
if (response.status == StatusCodes.NotFound) {
Unmarshal(HttpEntity.Empty: ResponseEntity)
} else if (response.status.isFailure()) {
- throw new Exception(s"Http status is failure ${response.status}")
+ throw new Exception(s"Http status is failure ${response.status} for ${requestStub.method} ${requestStub.uri}")
} else {
Unmarshal(response.entity)
}