Skip to content
Snippets Groups Projects
  • Raymond Cheung's avatar
    Enhance XCM Debugging with Log Capture in Unit Tests (#7594) · d189f9e7
    Raymond Cheung authored
    
    # Description
    
    This PR introduces a lightweight log-capturing mechanism for XCM unit
    tests, simplifying debugging by enabling structured log assertions. It
    partially addresses #6119 and #6125, offering an optional way to verify
    logs in tests while remaining unobtrusive in normal execution.
    
    # Key Changes
    
    * [x] Introduces a log capture utility in `sp_tracing`.
    * [x] Adds XCM test examples demonstrating how and when to use log
    capturing.
    
    # Review Notes:
    
    * The log capture mechanism is opt-in and does not affect existing tests
    unless explicitly used.
    * The implementation is minimal and does not add complexity to existing
    test setups.
    * It provides a structured alternative to
    [`sp_tracing::init_for_tests()`](https://paritytech.github.io/polkadot-sdk/master/sp_tracing/fn.init_for_tests.html)
    for log verification in automated tests.
    
    ---------
    
    Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    Unverified
    d189f9e7
Code owners
Assign users and groups as approvers for specific file changes. Learn more.