Skip to content

Add configurable logging levels and improve save operation logging#18

Merged
titusz merged 1 commit intomainfrom
claude/fix-issue-15-3zHAo
Feb 22, 2026
Merged

Add configurable logging levels and improve save operation logging#18
titusz merged 1 commit intomainfrom
claude/fix-issue-15-3zHAo

Conversation

@titusz
Copy link
Member

@titusz titusz commented Feb 21, 2026

Summary

This PR enhances logging capabilities in the ShardedIndex by introducing configurable log levels and improving observability of save operations.

Key Changes

  • Enhanced timer context manager: Added a level parameter (default: "DEBUG") to allow callers to specify the log level for timing messages, replacing hardcoded logger.info() calls with logger.log(level, ...)
  • Improved save operation logging: Added an info-level log message in ShardedIndex.save() that reports the number of shards saved and their destination path
  • Adjusted logging levels:
    • Changed rebuild_bloom() progress logging from info to debug level to reduce noise during routine operations
    • Updated _load_existing() to use INFO level for the timing context manager to maintain visibility of index loading operations

Implementation Details

  • The timer utility now accepts an optional level parameter that defaults to "DEBUG" for backward compatibility with existing callers
  • The save operation now discovers and reports the final shard count, providing better feedback to users about the operation's outcome
  • Logging level adjustments help distinguish between critical operations (INFO) and routine progress updates (DEBUG)

https://claude.ai/code/session_01QgojN6RTQjAHWrAXU8vwNo

Change individual shard operation logs (save, load, rotate, bloom filter)
from INFO to DEBUG level by defaulting the `timer` context manager to
DEBUG. Reserve INFO for aggregate operations: loading N shards summary
and new per-save summary message. Downgrade per-shard rebuild_bloom
progress from INFO to DEBUG.

Closes #15

https://claude.ai/code/session_01QgojN6RTQjAHWrAXU8vwNo
@titusz titusz force-pushed the claude/fix-issue-15-3zHAo branch from 5f7a085 to 15adbdf Compare February 22, 2026 08:18
@titusz titusz merged commit f31abe0 into main Feb 22, 2026
16 checks passed
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.

2 participants