From 89daa6c13d7795d7e22163b0dc26c732ed5c6326 Mon Sep 17 00:00:00 2001 From: Jonathan GUILLOT Date: Sun, 2 Mar 2025 22:45:42 +0100 Subject: [PATCH] Configure log4j2 to add logs to console When using Docker, logs are typically redirected to stdout and stderr to allow user to grab them using `docker logs`. For this purpose, edit log4j2 configuration to redirect logs to console in addition to openfire.log file. --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index cee7643..ea64c7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,7 @@ RUN apt-get update \ && mv /var/lib/openfire/plugins/admin /usr/share/openfire/plugin-admin \ && ln -s /usr/local/openjdk-17/bin/java /usr/bin/java \ && rm -rf /tmp/openfire_${OPENFIRE_VERSION}_all.deb \ + && sed -i 's//&/g' /usr/share/openfire/conf/log4j2.xml \ && rm -rf /var/lib/apt/lists/* COPY entrypoint.sh /sbin/entrypoint.sh