diff options
author | Juan J. Martinez <jjm@usebox.net> | 2021-02-27 18:43:03 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2021-07-22 19:49:51 +0100 |
commit | 1e7935f0d3d04c8afd682dbde5d40a2a347d0ea4 (patch) | |
tree | 757288992e8a6663095b7780d74e288b2ef9cce4 /Deployment.md | |
parent | 2262cb1bc2689b5b28d32bcf48be3c85b4aeed74 (diff) | |
download | spacebeans-1e7935f0d3d04c8afd682dbde5d40a2a347d0ea4.tar.gz spacebeans-1e7935f0d3d04c8afd682dbde5d40a2a347d0ea4.zip |
Better logs when using systemd
Diffstat (limited to 'Deployment.md')
-rw-r--r-- | Deployment.md | 28 |
1 files changed, 27 insertions, 1 deletions
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`: +``` +<configuration> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>[%level] %message%n%xException{10}</pattern> + </encoder> + </appender> + <logger name="net.usebox.gemini.server" level="INFO" /> + <root level="WARN"> + <appender-ref ref="STDOUT" /> + </root> +</configuration> +``` + +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. |