Display log via tail

On my openhab system (currently used 2.5.x) I have defined two aliases to monitor permanently the logs during changes/openhab restart.
The aliases are
alias elog=‘tail -f /var/log/openhab2/events.log’
alias olog=‘tail -f /var/log/openhab2/openhab.log’

I have found out that with openhab 3.x of course these aliases are still working, BUT I see that during an Openhab restart the tail command seems to stop.
So I have to execute the alias after the openhab restart again.
This behavior is different to 2.5.x and my question would be is there something I can do to have the same behaviour as in 2.5.x?

You can change it back to the old behavior by removing the <OnStartupTriggeringPolicy/> from the RollingFile appenders in the log4j2.xml configuration file.

It was introduced with:

1 Like

Or you can use tail -F which follows the file by filename instead of by inode.

I recommend using [multitail] color scheme for openhab logs which does this automatically, adds useful color coding, and can follow both files with one command.

1 Like

Thank you both for the useful hints.
Managed it.