Skip to content

Make debug log rotation configurable - #254

Open
parth-databricks wants to merge 3 commits into
databricks:mainfrom
parth-databricks:main
Open

Make debug log rotation configurable#254
parth-databricks wants to merge 3 commits into
databricks:mainfrom
parth-databricks:main

Conversation

@parth-databricks

Copy link
Copy Markdown

Summary

  • Add UCODE_DEBUG_MAX_BYTES and UCODE_DEBUG_BACKUP_COUNT so long-running sessions can keep more ~/.ucode/debug.log history
  • Preserve the existing defaults (1_000_000 bytes, 3 backups) when unset or invalid
  • Cover the parser with focused unit tests

Test plan

  • uv run pytest tests/test_databricks.py
  • uv run ruff check .
  • Manually verify with:
    UCODE_DEBUG=1 UCODE_DEBUG_MAX_BYTES=25000000 UCODE_DEBUG_BACKUP_COUNT=10 ucode status
    and confirm ~/.ucode/debug.log rotation uses the overrides

parth-databricks and others added 3 commits July 31, 2026 15:33
Allow long-running sessions to retain more diagnostic history while preserving current defaults for unset or invalid values.
Keep the env-var change code-only; the defaults are already documented in the logger helpers.
…tation

Make debug log rotation configurable
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.

1 participant