From 74570dc3300de673dda218fb5f27af846867a20c Mon Sep 17 00:00:00 2001 From: francescods Date: Wed, 5 Mar 2025 09:43:57 +0100 Subject: [PATCH] configurazione build task buildFatJar Ktor aggiunta file per il logging dell'applicazione (file logFile.log creato nella stessa folder di esecuzione dell'applicazione) --- build.gradle.kts | 4 ++++ src/main/resources/logback.xml | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/main/resources/logback.xml diff --git a/build.gradle.kts b/build.gradle.kts index f2b1945..cef2a10 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,6 +9,10 @@ plugins { kotlin("plugin.serialization") version "1.9.23" // Aggiungi il plugin di Serialization } +application { + mainClass.set("eu.maiora.ApplicationKt") +} + group = "org.maiora" version = "1.0-SNAPSHOT" diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..9714b07 --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,19 @@ + + + + %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + ./logFile.log + true + + %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + \ No newline at end of file