Releases: yllada/Send-Log-TCP
Releases · yllada/Send-Log-TCP
v1.3.0
[1.3.0] - 2025-11-17
🏗️ Architecture Improvements
- Professional RFC 6587 Implementation: Complete refactoring of TCP framing module
- Created dedicated
framing.gomodule with clean separation of concerns - Eliminated code spaghetti with modular, testable architecture
- Industry-standard implementation following RFC 6587 specifications
- Created dedicated
⚡ Performance Optimizations
- Efficient Memory Management:
- Pre-calculated buffer sizes to avoid memory reallocations
bytes.Bufferusage for optimal memory construction- Batch processing capability with
FrameBatch()method
- Benchmark Results:
- Octet Counting: 204.4 ns/op, 98 B/op, 2 allocs/op
- Non-Transparent: 107.1 ns/op, 96 B/op, 1 allocs/op
- Batch Processing: Highly efficient for multiple messages
✅ Comprehensive Validation
- UTF-8 Validation: RFC 5424 compliance with
utf8.ValidString() - Message Length Limits: Configurable maximum message length
- Framing-Specific Validation:
- Non-Transparent: Rejects messages containing LF characters
- Octet Counting: No content restrictions (as per RFC 6587)
- Empty Message Detection: Prevents invalid empty messages
🧪 Complete Test Coverage
- Unit Tests:
TestOctetCountingFraming: Verifies RFC 6587 Section 3.4.1 complianceTestNonTransparentFraming: Verifies RFC 6587 Section 3.4.2 complianceTestFramingValidation: Edge cases and validation rulesTestFrameBatch: Batch processing functionality
- Benchmarks:
BenchmarkOctetCountingFramingBenchmarkNonTransparentFramingBenchmarkFrameBatch
- All Tests Passing: 100% test success rate
📚 Enhanced Documentation
- Technical Documentation: New
TECHNICAL_DOCUMENTATION.mdwith:- Complete RFC 6587 implementation details
- Architecture diagrams and data flow
- Best practices and optimization techniques
- Performance benchmarks and analysis
- Integration examples (Backend & Frontend)
- Inline Code Documentation:
- Detailed comments with RFC references
- Implementation examples in comments
- Clear explanation of limitations and trade-offs
🔧 Backend Improvements
- Framer Component:
type Framer struct { config FramingConfig }
Frame(message): Single message framing with validationFrameBatch(messages): Efficient batch processingNewFramer(config): Constructor with flexible configuration
- Configuration Options:
type FramingConfig struct { Method FramingMethod ValidateUTF8 bool MaxMessageLength int }
- Helper Functions:
IsValidFramingMethod(): Method validationRecommendedFramingMethod(): Returns RFC-recommended methodDefaultFramingConfig(): Sensible defaults
🎯 Enhanced Error Handling
- Descriptive Error Messages: Context-rich error information
- RFC References in Errors: Error messages cite relevant RFC sections
- Validation Before Processing: Fail-fast approach prevents invalid operations
- Error Propagation: Clear error chains from validation to UI
🔄 Backward Compatibility
- Maintained API Compatibility: No breaking changes to existing functionality
- TLS Support Preserved: All TLS features remain functional
- RFC Compliance: Both RFC 5424 and RFC 3164 continue to work
- UI Unchanged: Frontend maintains same user experience
📦 Code Quality
- No Code Spaghetti: Clean, modular design with single responsibility principle
- DRY Principle: Eliminated code duplication through abstraction
- Type Safety: Strong typing throughout with proper Go idioms
- Memory Efficiency: Zero unnecessary allocations in hot paths
🚀 Standards Compliance
- RFC 6587: Full implementation of TCP transmission standard
- Section 3.4.1: Octet Counting (recommended method)
- Section 3.4.2: Non-Transparent Framing (legacy support)
- RFC 5424: UTF-8 validation and message format compliance
- RFC 5425: TLS/SSL transport (from v1.2.0, maintained)
- RFC 3164: BSD syslog protocol support (maintained)
🎨 UI Improvements
- Framing Method Selector:
- Clear labels: "Octet Counting (RFC 6587)" with star indicator
- "Non-Transparent (LF)" for legacy systems
- Disabled when UDP is selected (TCP-only feature)
- Auto-selects recommended method (Octet Counting)
🔬 Developer Experience
- Easy Testing:
go test -vruns all tests - Performance Profiling:
go test -bench=. -benchmemfor benchmarks - Clean Module Structure: Easy to understand and maintain
- Comprehensive Examples: Test files serve as usage examples
🐛 Bug Fixes
- Fixed Buffer Sizing: Correct pre-calculation prevents overflows
- UTF-8 Handling: Proper validation of multi-byte characters
- LF Detection: Accurate detection in non-transparent framing
- Message Length: Correct byte counting for all character encodings
v1.0.0
SendLog Syslog Changelog
[1.0.0] - 2024-10-26
Added
- Dual Protocol Support: Send log data over both TCP and UDP.
- Simple Setup: Easy to install and configure for quick integration.
- Reliable (TCP): Ensures reliable delivery of log data with automatic retries.
- Fast and Lightweight (UDP): For scenarios where speed is prioritized over reliability.
Fixed
- Initial release, no fixes yet.
Changed
- Initial release, no changes yet.