From c0c55c3370a7aeeb5657e864388577e93e0ce528 Mon Sep 17 00:00:00 2001 From: mccarrascog Date: Mon, 27 May 2024 13:10:22 +0200 Subject: [PATCH] corrections in logger.info syntax in AssistantRoutes.kt --- .../functional/xef/server/http/routes/AssistantRoutes.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/main/kotlin/com/xebia/functional/xef/server/http/routes/AssistantRoutes.kt b/server/src/main/kotlin/com/xebia/functional/xef/server/http/routes/AssistantRoutes.kt index 3f12ce624..f3005bec1 100644 --- a/server/src/main/kotlin/com/xebia/functional/xef/server/http/routes/AssistantRoutes.kt +++ b/server/src/main/kotlin/com/xebia/functional/xef/server/http/routes/AssistantRoutes.kt @@ -23,7 +23,7 @@ fun Routing.assistantRoutes(logger: KLogger) { val request = call.receive() val assistant = Assistant(request) val response = assistant.get() - logger.info("Created assistant: ${response.name} with id: ${response.id}") + logger.info{"Created assistant: ${response.name} with id: ${response.id}"} call.respond(status = HttpStatusCode.Created, response) } else { call.respond( @@ -65,7 +65,7 @@ fun Routing.assistantRoutes(logger: KLogger) { } val assistant = Assistant(id) val response = assistant.modify(request).get() - logger.info("Modified assistant: ${response.name} with id: ${response.id}") + logger.info{"Modified assistant: ${response.name} with id: ${response.id}"} call.respond(HttpStatusCode.OK, response) } else { call.respond( @@ -94,7 +94,7 @@ fun Routing.assistantRoutes(logger: KLogger) { val response = assistantsApi.deleteAssistant(id, configure = { header("OpenAI-Beta", "assistants=v2") }) - logger.info("Deleted assistant: ${assistant.name} with id: ${response.id}") + logger.info{"Deleted assistant: ${assistant.name} with id: ${response.id}"} call.respond(status = HttpStatusCode.NoContent, response) } catch (e: Exception) { val trace = e.stackTraceToString()