From 8d3f8208e1f2f0786b66e67fa58a0543e4557974 Mon Sep 17 00:00:00 2001 From: Sven Carstensen Date: Thu, 25 Sep 2025 22:13:25 +0200 Subject: [PATCH] Erweiterungen --- .gitignore | 4 ++++ src/main/resources/application-dev.properties | 6 +++++- src/main/resources/application-prod.properties | 8 -------- src/main/resources/application-production.properties | 12 +++++++++++- src/main/resources/application.properties | 9 +++++++++ 5 files changed, 29 insertions(+), 10 deletions(-) delete mode 100644 src/main/resources/application-prod.properties diff --git a/.gitignore b/.gitignore index 21f8584..04de303 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,7 @@ node_modules/ src/main/frontend/generated/ vite.generated.ts + +# Log files +logs/ +*.log diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 16386d5..12c25a3 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -7,4 +7,8 @@ spring.data.mongodb.uri=mongodb://192.168.180.25:27017/votianlt_dev vaadin.launch-browser=true # Development logging levels -logging.level.de.assecutor.votianlt=DEBUG \ No newline at end of file +logging.level.de.assecutor.votianlt=DEBUG +logging.level.root=INFO + +# Development file logging - more verbose +logging.file.name=logs/votianlt-dev.log \ No newline at end of file diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties deleted file mode 100644 index a6dbf5f..0000000 --- a/src/main/resources/application-prod.properties +++ /dev/null @@ -1,8 +0,0 @@ -# Production Configuration -# 2FA Configuration - Aktiviert für Produktion -app.security.two-factor.enabled=true - -# Production-specific settings -logging.level.root=WARN -logging.level.de.assecutor.votianlt=INFO - diff --git a/src/main/resources/application-production.properties b/src/main/resources/application-production.properties index 6c96786..a68e911 100644 --- a/src/main/resources/application-production.properties +++ b/src/main/resources/application-production.properties @@ -4,4 +4,14 @@ spring.data.mongodb.uri=mongodb://192.168.180.25:27017/votianlt # Disable browser launch in production -vaadin.launch-browser=false \ No newline at end of file +vaadin.launch-browser=false + +# 2FA Configuration - Enabled for production +app.security.two-factor.enabled=true + +# Production logging configuration +logging.level.de.assecutor.votianlt=INFO +logging.level.root=WARN +logging.file.name=logs/votianlt-production.log +logging.file.max-size=50MB +logging.file.max-history=90 \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 99c6a81..3de6c8c 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -3,10 +3,19 @@ server.address=0.0.0.0 # Default active profile spring.profiles.active=dev + +# Logging configuration logging.level.org.atmosphere=warn logging.level.de.assecutor.votianlt=INFO logging.level.de.assecutor.votianlt.controller.MessageController=DEBUG logging.level.de.assecutor.votianlt.config.MongoConfig=DEBUG + +# File logging configuration +logging.file.name=logs/votianlt.log +logging.logback.rollingpolicy.max-file-size=10MB +logging.logback.rollingpolicy.max-history=30 +logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n +logging.pattern.console=%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n spring.mustache.check-template-location=false # Launch the default browser when starting the application in development mode