I’m a big fan of a clean system and that’s why I delete from time to time all the log files
openHAB creates the new log files only during the boot process. Does someone know if there is a process or command available (e.g. console) to force that without a reboot?
I also tried this: > /var/log/openhab2/openhab.log
This command works to empty the file, but the system is in appending mode, remembers the line and creates a lot of empty lines (nulls) as soon as the next entry is written.
You can define when ( day, file size ) a log should be rotated ( this means a new file is to be created ) and how many files to keep to be able to analyze problems from the past.
Older files also will be compressed in case they should be kept.