[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 02/02: reduce logging
From: |
gnunet |
Subject: |
[libeufin] 02/02: reduce logging |
Date: |
Fri, 18 Nov 2022 06:52:05 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit 0583cf84bed2a4c2f788ded5bdff15495305c7fe
Author: MS <ms@taler.net>
AuthorDate: Fri Nov 18 06:51:43 2022 +0100
reduce logging
---
sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 10 ++++------
util/src/main/kotlin/HTTP.kt | 4 +++-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index b442d75a..7e328f67 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -476,9 +476,7 @@ val sandboxApp: Application.() -> Unit = {
this.level = Level.DEBUG
this.logger = tech.libeufin.sandbox.logger
this.format { call ->
- val t = Thread.currentThread()
- "${call.response.status()}, ${call.request.httpMethod.value}
${call.request.path()}" +
- " - thread (id/name/group):
${t.id}/${t.name}/${t.threadGroup.name}"
+ "${call.response.status()}, ${call.request.httpMethod.value}
${call.request.path()}"
}
}
install(CORS) {
@@ -507,7 +505,7 @@ val sandboxApp: Application.() -> Unit = {
}
install(StatusPages) {
exception<ArithmeticException> { cause ->
- logger.error("Exception while handling '${call.request.uri}'",
cause)
+ logger.error("Exception while handling '${call.request.uri}',
${cause.message}")
call.respondText(
"Invalid arithmetic attempted.",
ContentType.Text.Plain,
@@ -529,7 +527,7 @@ val sandboxApp: Application.() -> Unit = {
)
}
exception<UtilError> { cause ->
- logger.error("Exception while handling '${call.request.uri}'",
cause)
+ logger.error("Exception while handling '${call.request.uri}',
${cause.reason}")
call.respond(
cause.statusCode,
SandboxErrorJson(
@@ -545,7 +543,7 @@ val sandboxApp: Application.() -> Unit = {
respondEbicsTransfer(call, e.errorText, e.errorCode)
}
exception<Throwable> { cause ->
- logger.error("Exception while handling '${call.request.uri}'",
cause)
+ logger.error("Exception while handling '${call.request.uri}'",
cause.message)
call.respondText(
"Internal server error.",
ContentType.Text.Plain,
diff --git a/util/src/main/kotlin/HTTP.kt b/util/src/main/kotlin/HTTP.kt
index 387a7b05..647a331f 100644
--- a/util/src/main/kotlin/HTTP.kt
+++ b/util/src/main/kotlin/HTTP.kt
@@ -19,7 +19,9 @@ fun unauthorized(msg: String): UtilError {
fun notFound(msg: String): UtilError {
return UtilError(
- HttpStatusCode.NotFound, msg, LibeufinErrorCode.LIBEUFIN_EC_NONE
+ HttpStatusCode.NotFound,
+ msg,
+ LibeufinErrorCode.LIBEUFIN_EC_NONE
)
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.