From 1e7935f0d3d04c8afd682dbde5d40a2a347d0ea4 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 27 Feb 2021 18:43:03 +0000 Subject: Better logs when using systemd --- Deployment.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Deployment.md b/Deployment.md index 126dfdb..1fbf410 100644 --- a/Deployment.md +++ b/Deployment.md @@ -111,5 +111,31 @@ Then enable it so it starts after a reboot: systemctl enable spacebeans.service ``` -And you're done! +And you're probably done! + +6. Optionally, tidy up your logs. + +The logs have redundant information when collected by systemd. + +Create this file in `/opt/spacebeans/logback.xml`: +``` + + + + [%level] %message%n%xException{10} + + + + + + + +``` + +Change the `ExecStart` command in your service file to: +``` +ExecStart=/usr/bin/java -Dlogback.configurationFile=/opt/spacebeans/logback.xml -jar /opt/spacebeans/spacebeans-VERSION.jar -c /opt/spacebeans/spacebeans.conf +``` + +This should make the logs nicer. -- cgit v1.2.3