aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2026-06-09 11:09:28 +0200
committerGitHub <noreply@github.com>2026-06-09 11:09:28 +0200
commit475e1c0078f2026a2b395fef2ec85219013bde81 (patch)
treecbf858f7c863ce51f5a3fbf34d39b6dee4a70dd3 /pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java
parent2110e6de6b3b201cb78a2777d43e76ebaed35b78 (diff)
downloadpdf-as-4-475e1c0078f2026a2b395fef2ec85219013bde81.tar.gz
pdf-as-4-475e1c0078f2026a2b395fef2ec85219013bde81.tar.bz2
pdf-as-4-475e1c0078f2026a2b395fef2ec85219013bde81.zip
map the legacy logback.configurationFile property to spring's logging.config (#88)
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java
index e9ba88be..14b68956 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java
@@ -1,5 +1,6 @@
package at.gv.egiz.pdfas.web;
+import lombok.val;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
@@ -7,6 +8,19 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
@SpringBootApplication
public class PdfAsWeb extends SpringBootServletInitializer {
+
+ static {
+ // compatibility layer: map the old logback.configurationFile to the new logging.config
+ final String SPRING_LOG_CFG = "logging.config";
+ final String LEGACY_LOGBACK_LOG_CFG = "logback.configurationFile";
+ if (System.getProperty(SPRING_LOG_CFG) == null) {
+ val legacyValue = System.getProperty(LEGACY_LOGBACK_LOG_CFG);
+ if (legacyValue != null) {
+ System.setProperty(SPRING_LOG_CFG, legacyValue);
+ }
+ }
+ }
+
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(PdfAsWeb.class);