feat: Implement structured logging with debug mode toggle and request…#157
Merged
Haroldwonder merged 2 commits intoHaroldwonder:mainfrom Feb 25, 2026
Merged
feat: Implement structured logging with debug mode toggle and request…#157Haroldwonder merged 2 commits intoHaroldwonder:mainfrom
Haroldwonder merged 2 commits intoHaroldwonder:mainfrom
Conversation
…/response logging ✨ Features: - Structured logs with multiple levels (ERROR, WARN, INFO, DEBUG, TRACE) - Debug mode toggle via --debug and --verbose CLI flags - Request/response logging with timing information - Sensitive data redaction (configurable) - Request ID correlation for distributed tracing - Operation start/complete tracking with duration - Integration with Soroban event system 📁 New Files: - src/logging.rs: Core logging implementation - src/logging_tests.rs: Comprehensive test suite - examples/logging_example.rs: Usage demonstration - examples/logging_demo.sh: Interactive demo script - LOGGING.md: Complete documentation and usage guide 🔧 Modified Files: - src/lib.rs: Added logging module and contract integration - src/main.rs: Added CLI flags for logging configuration - src/transport.rs: Enhanced with request/response logging 🛡️ Security: - Sensitive data redaction enabled by default - Configurable redaction patterns - Log size limits to prevent memory issues - Production-safe default configuration 🚀 Performance: - Debug logs filtered at source when disabled - Minimal overhead for disabled log levels - Configurable log size truncation - Optional request correlation Closes: Structured logs, Debug mode toggle, Request/response logging requirements
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.
thi spr closes #116
✨ Features:
📁 New Files:
🔧 Modified Files:
🛡️ Security:
🚀 Performance:
Closes: Structured logs, Debug mode toggle, Request/response logging requirements