diff options
| author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2026-06-09 11:09:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-09 11:09:28 +0200 |
| commit | 475e1c0078f2026a2b395fef2ec85219013bde81 (patch) | |
| tree | cbf858f7c863ce51f5a3fbf34d39b6dee4a70dd3 /pdf-as-web/src/main/java/at/gv | |
| parent | 2110e6de6b3b201cb78a2777d43e76ebaed35b78 (diff) | |
| download | pdf-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')
| -rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/PdfAsWeb.java | 14 |
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); |
