From 8c7e9452f36d18c7425329a9dad4e6b5a7eb8761 Mon Sep 17 00:00:00 2001 From: "martin.dietrich" Date: Mon, 11 Nov 2024 17:11:11 +0100 Subject: [PATCH] test logs added --- .../java/de/muenchen/mobidam/MicroServiceApplication.java | 6 ++++++ .../src/main/resources/logback-spring.xml | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mobidam-sst-management-backend/src/main/java/de/muenchen/mobidam/MicroServiceApplication.java b/mobidam-sst-management-backend/src/main/java/de/muenchen/mobidam/MicroServiceApplication.java index 09270e7a..5b404151 100644 --- a/mobidam-sst-management-backend/src/main/java/de/muenchen/mobidam/MicroServiceApplication.java +++ b/mobidam-sst-management-backend/src/main/java/de/muenchen/mobidam/MicroServiceApplication.java @@ -22,6 +22,7 @@ */ package de.muenchen.mobidam; +import lombok.extern.slf4j.Slf4j; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.domain.EntityScan; @@ -51,9 +52,14 @@ } ) @EnableAutoConfiguration +@Slf4j public class MicroServiceApplication { public static void main(String[] args) { + Exception exc = new RuntimeException("myException"); + log.error(exc.toString()); + log.error("This is my exception: {}", exc.toString()); + log.error("There is my exception", exc); SpringApplication.run(MicroServiceApplication.class, args); } diff --git a/mobidam-sst-management-backend/src/main/resources/logback-spring.xml b/mobidam-sst-management-backend/src/main/resources/logback-spring.xml index 848d00e6..6098b76b 100644 --- a/mobidam-sst-management-backend/src/main/resources/logback-spring.xml +++ b/mobidam-sst-management-backend/src/main/resources/logback-spring.xml @@ -99,8 +99,8 @@ "fileName" : "%file", "line" : "%line" }, - "message": "%message", - "thrown": "%thrown" + "message": "%message" + }