Skip to content

Show initial lines before following logs#402

Open
GreyforgeLabs wants to merge 1 commit into
CortexLM:mainfrom
GreyforgeLabs:logs-follow-initial-lines
Open

Show initial lines before following logs#402
GreyforgeLabs wants to merge 1 commit into
CortexLM:mainfrom
GreyforgeLabs:logs-follow-initial-lines

Conversation

@GreyforgeLabs
Copy link
Copy Markdown

Summary

  • Print the requested initial tail window before entering logs --follow mode.
  • Apply the existing --level filter to the initial follow output as well as new lines.
  • Add a CLI regression test that confirms logs --follow --lines 2 emits the last two existing lines before tailing.

Fixes PlatformNetwork/bounty-challenge#51529.

Validation

  • cargo test -p cortex-cli --test logs_follow_lines --no-default-features --features cortex-tui -- --nocapture
  • cargo check -p cortex-cli --no-default-features --features cortex-tui
  • cargo fmt --package cortex-cli --check
  • git diff --check
  • git diff --cached --check

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] [v0.0.7] \cortex logs --follow -n <N>\ ignores requested line count

1 participant