From 64973f57cf3fa0008bf1537c52589ac778ef0dab Mon Sep 17 00:00:00 2001 From: Maxime Dor Date: Tue, 19 Sep 2017 01:03:44 +0200 Subject: [PATCH] Better defaults for logging --- src/main/resources/application.yaml | 14 ++++++++++++++ src/systemd/mxisd.service | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 90c8ff3..87d88f1 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -1,3 +1,7 @@ +spring: + main: + banner-mode: 'off' + logging: level: org: @@ -5,6 +9,8 @@ logging: apache: catalina: "WARN" directory: "WARN" + pattern: + console: '%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:%5p} [%15.15t] %35.35logger{34} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx}' server: port: 8090 @@ -65,3 +71,11 @@ invite: storage: backend: 'sqlite' + +--- +spring: + profiles: systemd + +logging: + pattern: + console: '%d{.SSS}${LOG_LEVEL_PATTERN:%5p} [%15.15t] %35.35logger{34} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx}' diff --git a/src/systemd/mxisd.service b/src/systemd/mxisd.service index a9ff0f9..fa21acb 100644 --- a/src/systemd/mxisd.service +++ b/src/systemd/mxisd.service @@ -4,7 +4,7 @@ After=syslog.target [Service] User=mxisd -ExecStart=/usr/bin/mxisd --spring.config.location=/etc/mxisd/ --spring.config.name=mxisd +ExecStart=/usr/bin/mxisd --spring.config.location=/etc/mxisd/ --spring.config.name=mxisd --spring.profiles.active=systemd SuccessExitStatus=143 [Install]