Skip to content

Respect level filter when clearing logs#403

Open
GreyforgeLabs wants to merge 1 commit into
CortexLM:mainfrom
GreyforgeLabs:logs-clear-level-filter
Open

Respect level filter when clearing logs#403
GreyforgeLabs wants to merge 1 commit into
CortexLM:mainfrom
GreyforgeLabs:logs-clear-level-filter

Conversation

@GreyforgeLabs
Copy link
Copy Markdown

Summary

  • Honor --level when logs --clear selects files for deletion.
  • Preserve non-matching level log files during level-scoped cleanup.
  • Add CLI regression coverage for logs --clear --level error keeping debug/info logs.

Fixes PlatformNetwork/bounty-challenge#51573.

Validation

  • cargo test -p cortex-cli --test logs_clear_level --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] [alpha] cortex logs --clear --level ignores level filter and clears all log files

1 participant