Skip to content

Filter logs clear to log files#400

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

Filter logs clear to log files#400
GreyforgeLabs wants to merge 1 commit into
CortexLM:mainfrom
GreyforgeLabs:logs-clear-filter-log-files

Conversation

@GreyforgeLabs
Copy link
Copy Markdown

Summary

  • Add shared log-file detection for log cleanup.
  • Restrict cortex logs --clear deletion to .log and .txt files.
  • Add CLI regression coverage that non-log sidecar files remain after cleanup.

Fixes PlatformNetwork/bounty-challenge#51691.

Validation

  • cargo test -p cortex-cli --test logs_clear --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] cortex logs --clear removes any old file in the logs directory instead of only .log and .txt log files

1 participant