Skip to content

feat: Implement structured logging with debug mode toggle and request…#157

Merged
Haroldwonder merged 2 commits intoHaroldwonder:mainfrom
Hahfyeex:main
Feb 25, 2026
Merged

feat: Implement structured logging with debug mode toggle and request…#157
Haroldwonder merged 2 commits intoHaroldwonder:mainfrom
Hahfyeex:main

Conversation

@Hahfyeex
Copy link
Contributor

thi spr closes #116

✨ 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

Hahfyeex and others added 2 commits February 25, 2026 23:00
…/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
@Haroldwonder Haroldwonder merged commit b7a77fe into Haroldwonder:main Feb 25, 2026
0 of 7 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.

Add Logging & Debug Mode

2 participants