Log:display --follow option?

Hi,
I’m running openhab 4 with docker, I’ve read log by doing:

docker exec -it  openhab-openhab-1 bash
/openhab# runtime/bin/client
openhab> log:display

Is there any option do make log:display act like tail -f option to show new the logs without restarting the command every time?

Thanks, BR

Why not just follow the log files? They are located in /openhab/userdata/logs which should be mounted as a volume into the container which should also mean you can get to it from the host too. But tail is installed in the container so you could use

docker exec -it openhab-openhab-1 tail -f /openhab/userdata/logs/openhab.log

But in answer to your question, use log:tail instead of log:display.

When in the console, you can type the first part of any command followed by “–help” (e.g. log --help) and it will tell you all the valid subcommands.

openhab> log --help
SUBSHELL
        log

COMMANDS
    log:clear             Clear log entries.
    log:display           Displays log entries.
    log:exception-display Displays the last occurred exception from the log.
    log:get               Shows the currently set log level.
    log:load-test         Load test log.
    log:log               Log a message.
    log:set               Sets the log level.
    log:tail              Continuously display log entries. Use ctrl-c to quit this command
1 Like

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