[OH3 docker] - log files are overwritten at container restart

Hi everyone,

I am running an OH3 instance in a docker container.
I noticed that the openhab log files (/openhab/userdata/logs/events.log and /openhab/userdata/logs/openhab.log) that were previously created and fed by the container, are always rewritten at every restart of the OH3 container.

Is there a way to tell OH3 to append new information to the existing log files instead of overwriting them at each container restart?


The files should not be overwritten but rotated. Every time OH starts it will rotate the old file off to openhab.log.1 (moving 1 to 2 and so on down the line to 9) and start new file.

This behavior can be modified in log4j2.xml.

However, if the files are in fact disappearing, have you mounted a volume to preserve the files across a restart of the container?

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.