diff options
author | vlad <vlad@driver.xyz> | 2017-03-31 21:39:42 -0700 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2017-03-31 21:39:42 -0700 |
commit | 0dc9f24cef4ea4e58afa59fab565e36796c0cb1d (patch) | |
tree | 54bc1a970446cd084d0a1cd1ed703ed30bd6cca9 /src/main/scala/xyz/driver/core/app.scala | |
parent | 579385610032cf437d355a92ccf2ade189959423 (diff) | |
download | driver-core-0dc9f24cef4ea4e58afa59fab565e36796c0cb1d.tar.gz driver-core-0dc9f24cef4ea4e58afa59fab565e36796c0cb1d.tar.bz2 driver-core-0dc9f24cef4ea4e58afa59fab565e36796c0cb1d.zip |
Logging clean up, Monadic execution utilsv0.10.39
Diffstat (limited to 'src/main/scala/xyz/driver/core/app.scala')
-rw-r--r-- | src/main/scala/xyz/driver/core/app.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/xyz/driver/core/app.scala b/src/main/scala/xyz/driver/core/app.scala index 4966b9d..4b81897 100644 --- a/src/main/scala/xyz/driver/core/app.scala +++ b/src/main/scala/xyz/driver/core/app.scala @@ -99,26 +99,26 @@ object app { case is: IllegalStateException => ctx => MDC.put("trackingId", rest.extractTrackingId(ctx.request)) - log.error(s"Request is not allowed to ${ctx.request.uri}", is) + log.error(s"Request is not allowed to ${ctx.request.method} ${ctx.request.uri}", is) complete(HttpResponse(BadRequest, entity = is.getMessage))(ctx) case cm: ConcurrentModificationException => ctx => MDC.put("trackingId", rest.extractTrackingId(ctx.request)) - log.error(s"Concurrent modification of the resource ${ctx.request.uri}", cm) + log.error(s"Concurrent modification of the resource ${ctx.request.method} ${ctx.request.uri}", cm) complete( HttpResponse(Conflict, entity = "Resource was changed concurrently, try requesting a newer version"))(ctx) case sex: SQLException => ctx => MDC.put("trackingId", rest.extractTrackingId(ctx.request)) - log.error(s"Database exception for the resource ${ctx.request.uri}", sex) + log.error(s"Database exception for the resource ${ctx.request.method} ${ctx.request.uri}", sex) complete(HttpResponse(InternalServerError, entity = "Data access error"))(ctx) case t: Throwable => ctx => MDC.put("trackingId", rest.extractTrackingId(ctx.request)) - log.error(s"Request to ${ctx.request.uri} could not be handled normally", t) + log.error(s"Request to ${ctx.request.method} ${ctx.request.uri} could not be handled normally", t) complete(HttpResponse(InternalServerError, entity = t.getMessage))(ctx) } |