to /etc/fstab. But now there is no openhab2-logfile diretcory anmore, also OH2 isn´t running after a server reboot. If i remove the line in fstab and make a reboot, all is working fine again.
I also tried other combinations in fstab, but everytime the log-directory is moved to tmpfs, OH2 was not running after a reboot.
Maybe… try mode=0777 (or change the ownership of /var/log/openhab2 to openhab)
OH2 runs with user openhab and maybe it cannot create the directory and then write the log.
You have to persist the folder structure since it does not get created from the logging classes.
Or you go the easy way and save the folder once a day/week/month on the sd-card and restore it on startup.
Strange behaviour… On OH1 it worked like a charm. Without persisting folder structure.
Ok, i will try another way to do this. Maybe it works, if i only move /var/log/openhab2 folder to the ramdisk, then the folder structure should be ok?
Can i only change the place of the log directory with editing /etc/fstab or is there a possibility inside OH2 too? Maybe a configuration-file for logging?