feat(cli): comprehensive indexer logging#136
Merged
Merged
Conversation
Logging: - Add logger option to ScanOptions and IndexOptions - Log per-language file counts during discovery - Log scan progress per language - Log embedding progress every 10 batches - Pass logger from CLI (--verbose enables debug level) Go Exclusions (default): - *.pb.go (protobuf) - *.gen.go, *_gen.go (code generators) - *.pb.gw.go (gRPC gateway) - mock_*.go (mockgen) - mocks/ (mock directories) - testdata/ (test fixtures) Spinner UX: - Show 'Embedding X/Y documents' during storing phase - Added totalDocuments to IndexProgress for accurate counts Tests updated for new type imports.
- GitIndexer: add logger option with progress logging
- GitHubIndexer: add logger and onProgress callback
- CLI git/gh commands: add --verbose flag
- Spinner shows progress: 'Embedding X/Y commits/docs (N%)'
Example output:
[git-indexer] Starting git commit extraction {limit: 500}
[git-indexer] Extracted commits {commits: 500}
[git-indexer] Embedded 320/500 commits {batch: 10}
[github-indexer] Fetched GitHub documents {documents: 150}
[github-indexer] Document breakdown {issues: 100, prs: 50}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add comprehensive logging to all indexers (code scanner, git history, GitHub issues) for better visibility during indexing operations.
Changes
Code Scanner & Indexer
loggeroption toScanOptionsandIndexOptionsEmbedding 4480/49151 documents (9%)Git Indexer
loggeroption toGitIndexOptionsdev git index --verbosefor debug outputEmbedding 320/500 commits (64%)GitHub Indexer
loggerandonProgresstoGitHubIndexOptionsdev gh index --verbosefor debug outputEmbedding 50/150 GitHub docsGo-Specific Exclusions
*.pb.go(protobuf),*.gen.go(generators)mock_*.go,mocks/,testdata/Example Output
Testing