Skip to content

Unexpected behavior with --follow #934

@belousovbb

Description

@belousovbb

Hi and thank you for this useful tool!

I’m trying to follow logs using hl directly, but I’ve run into some unexpected behavior. According to the README, this should work:

hl --follow --tail 100 tmp.log

But when I run it, it just hangs with empty lines — it doesn’t continue following the log like tail -f would.

However, this command works as expected:

tail -f tmp.log | hl -P --tail 100

It continuously prints new log lines and highlights them correctly.

So I’m wondering:
Am I doing something wrong with hl --follow?
Or is there a known issue with the follow mode

I’ve tested this with:
• Docker container logs, using docker compose logs -f service_name | hl --follow
• A manually appended file, using something like: echo "$LOG_ENTRY" >> tmp.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions