Module logging

Module logging 

Source
Expand description

LiteSVM integration for Light Protocol logging

This module provides the glue layer between LiteSVM and the instruction-decoder crate. All logging types, decoders, and formatting utilities are in light-instruction-decoder.

This module only contains:

  • LiteSVM-specific transaction result parsing (from_transaction_result)
  • Log file I/O functions
  • Re-exports from instruction-decoder

Structs§

AccountChange
Account state changes during transaction
AccountCompressionInstructionDecoder
Generated InstructionDecoder implementation
AccountStateSnapshot
Pre and post transaction account state snapshot
CTokenInstructionDecoder
Generated InstructionDecoder implementation
Colors
Colors for terminal output
CompressedAccountInfo
Compressed account information
ComputeBudgetInstructionDecoder
Generated InstructionDecoder implementation
DecodedField
A decoded instruction field for display.
DecodedInstruction
Result of decoding an instruction.
DecoderRegistry
Registry of instruction decoders
EnhancedInstructionLog
Enhanced instruction log with hierarchy and parsing
EnhancedLoggingConfig
Configuration for enhanced transaction logging
EnhancedTransactionLog
Enhanced transaction log containing all formatting information
LightProtocolEvent
Light Protocol specific events
LightSystemInstructionDecoder
Generated InstructionDecoder implementation
MerkleTreeChange
Merkle tree state change
RegistryInstructionDecoder
Generated InstructionDecoder implementation
SplTokenInstructionDecoder
Generated InstructionDecoder implementation
SystemInstructionDecoder
Generated InstructionDecoder implementation
Token2022InstructionDecoder
Generated InstructionDecoder implementation
TransactionFormatter
Transaction formatter with configurable output

Enums§

AccountAccess
Account access pattern during transaction
LogVerbosity
Verbosity levels for transaction logging
TransactionStatus
Transaction execution status

Traits§

InstructionDecoder
Trait for instruction decoders - each program implements this.

Functions§

capture_account_states
Capture account states from LiteSVM context. Call this before and after sending the transaction.
from_transaction_result
Create EnhancedTransactionLog from LiteSVM transaction result
log_transaction_enhanced
Main entry point for enhanced transaction logging
log_transaction_enhanced_with_console
Enhanced transaction logging with console output control
should_use_enhanced_logging
Check if enhanced logging should be used instead of basic logging

Type Aliases§

AccountStates
Lightweight pre-transaction account state capture. Maps pubkey -> (lamports, data_len) for accounts in a transaction.