Transaction Log¶
Immutable, cryptographically-verified audit trails for compliance and forensic analysis.
Overview¶
The Transaction Log provides tamper-evident logging with cryptographic integrity verification, supporting regulatory compliance requirements including SOC 2, HIPAA, ISO 27001, PCI-DSS, and GDPR.
See Security - Transaction Log for complete implementation details.
Key Features¶
- Immutable Append-Only: Entries cannot be modified or deleted
- Cryptographic Hash Chains: SHA-256 linking prevents tampering
- Compliance Support: 7+ year retention for SOC 2, HIPAA, ISO 27001
- Time-Travel Debugging: Replay historical state
- Export/Import: JSON export for audits with integrity verification
Quick Start¶
use stratarouter_enterprise::transaction_log::{TransactionLog, LogEntry};
// Create log
let log = TransactionLog::new(config).await?;
// Log event
log.append(LogEntry::new(
"routing_decision",
serde_json::json!({
"route": "gpt-4",
"confidence": 0.92,
"cost": 0.03,
}),
)).await?;
// Verify integrity
assert!(log.verify_chain().await?);
Documentation¶
For complete documentation including: - Log entry structure - Retention policies - Compliance standards - Performance characteristics - Export/import operations
See Also¶
- Security - Full transaction log implementation
- Audit Logging - Audit trail features
- Multi-Tenancy - Tenant isolation