Skip to content

xcm-builder: added logging for xcm filters/helpers/matchers/types (#2408)#7003

Merged
acatangiu merged 80 commits intoparitytech:masterfrom
ayevbeosa:ayevbeosa-more-xcm-logs
Feb 21, 2025
Merged

xcm-builder: added logging for xcm filters/helpers/matchers/types (#2408)#7003
acatangiu merged 80 commits intoparitytech:masterfrom
ayevbeosa:ayevbeosa-more-xcm-logs

Conversation

@ayevbeosa
Copy link
Copy Markdown
Contributor

@ayevbeosa ayevbeosa commented Dec 26, 2024

Description

Added logs in pallet-xcm to help in debugging, fixes #2408, and in continuation of #4982

Checklist

Polkadot Address: 1Gz5aLtEu2n4jsfA6XwtZnuaRymJrDDw4kEGdNHTdxrpzrc

@ayevbeosa ayevbeosa changed the title pallet-xcm: added logging for xcm filters/helpers/matchers/types (#2408) xcm-builder: added logging for xcm filters/helpers/matchers/types (#2408) Dec 26, 2024
@ayevbeosa ayevbeosa marked this pull request as ready for review December 27, 2024 05:43
@ayevbeosa ayevbeosa requested a review from a team as a code owner December 27, 2024 05:43
Copy link
Copy Markdown
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please change all these calls to follow the same pattern as shown by me in teh suggestions?

@substrate-tip-bot
Copy link
Copy Markdown

@acatangiu A referendum for a small (20 DOT) tip was successfully submitted for @ayevbeosa (1Gz5aLtEu2n4jsfA6XwtZnuaRymJrDDw4kEGdNHTdxrpzrc on polkadot).

Referendum number: 1451.
tip

@substrate-tip-bot
Copy link
Copy Markdown

The referendum has appeared on Polkassembly.

@raymondkfcheung
Copy link
Copy Markdown
Contributor

/cmd fmt

@acatangiu acatangiu added this pull request to the merge queue Feb 21, 2025
Merged via the queue into paritytech:master with commit 934c091 Feb 21, 2025
237 of 254 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Jun 4, 2025
This PR enhances diagnostics across XCM-related components by
implementing more detailed logging, especially for failures. The primary
aim is to improve visibility into XCM errors (e.g., within `map_err`
blocks), enabling faster troubleshooting for developers and node
operators.

Key enhancements include:
* Logging specific error conditions (e.g., `BadVersion`, `BadLocation`,
execution errors).
* Including essential context in error logs (e.g., message hashes,
origin, destination, relevant parameters).
* Standardising log targets for easier analysis (e.g.,
`xcm::module::function_name`).
* Clarifying log messages.

This work continues #7003 and partially addresses #6119.

## Integration

Downstream projects using XCM functionalities should see improved
diagnostic logs without needing direct integration changes, as this
primarily enhances internal logging. Node operators will find new, more
detailed XCM error logs, aiding in monitoring and troubleshooting. Log
parsing scripts might need updates for new log formats.

## Review Notes

This PR enhances logging throughout XCM-related code paths, particularly
in error handling (e.g., `map_err` blocks), to improve failure
visibility.

Reviewers are encouraged to assess:
* **Clarity & Actionability:** Are logs clear, concise, and actionable
for failures?
* **Context:** Do error logs capture essential context (message hash,
origin, destination, error specifics, parameters) appropriately for
their level?
* **Log Levels:** Is the chosen log level (e.g., `error`, `warn`,
`debug`, `trace`) suitable? Are any level adjustments appropriate?
* **Targets:** Are `target:` fields (e.g., `xcm::module::function`)
consistent and specific?
* **Error Accuracy:** Do logs accurately reflect the handled error
condition?
* **Impact:** Logging should minimally affect core logic and
performance; favour simple logging of existing/easily derived data.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
pgherveou pushed a commit that referenced this pull request Jun 11, 2025
This PR enhances diagnostics across XCM-related components by
implementing more detailed logging, especially for failures. The primary
aim is to improve visibility into XCM errors (e.g., within `map_err`
blocks), enabling faster troubleshooting for developers and node
operators.

Key enhancements include:
* Logging specific error conditions (e.g., `BadVersion`, `BadLocation`,
execution errors).
* Including essential context in error logs (e.g., message hashes,
origin, destination, relevant parameters).
* Standardising log targets for easier analysis (e.g.,
`xcm::module::function_name`).
* Clarifying log messages.

This work continues #7003 and partially addresses #6119.

## Integration

Downstream projects using XCM functionalities should see improved
diagnostic logs without needing direct integration changes, as this
primarily enhances internal logging. Node operators will find new, more
detailed XCM error logs, aiding in monitoring and troubleshooting. Log
parsing scripts might need updates for new log formats.

## Review Notes

This PR enhances logging throughout XCM-related code paths, particularly
in error handling (e.g., `map_err` blocks), to improve failure
visibility.

Reviewers are encouraged to assess:
* **Clarity & Actionability:** Are logs clear, concise, and actionable
for failures?
* **Context:** Do error logs capture essential context (message hash,
origin, destination, error specifics, parameters) appropriately for
their level?
* **Log Levels:** Is the chosen log level (e.g., `error`, `warn`,
`debug`, `trace`) suitable? Are any level adjustments appropriate?
* **Targets:** Are `target:` fields (e.g., `xcm::module::function`)
consistent and specific?
* **Error Accuracy:** Do logs accurately reflect the handled error
condition?
* **Impact:** Logging should minimally affect core logic and
performance; favour simple logging of existing/easily derived data.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@acatangiu acatangiu moved this from To be released (SDK) to SDK Released - Needs Integration in fellowship/runtimes integrations queue Jul 3, 2025
alvicsam pushed a commit that referenced this pull request Oct 17, 2025
This PR enhances diagnostics across XCM-related components by
implementing more detailed logging, especially for failures. The primary
aim is to improve visibility into XCM errors (e.g., within `map_err`
blocks), enabling faster troubleshooting for developers and node
operators.

Key enhancements include:
* Logging specific error conditions (e.g., `BadVersion`, `BadLocation`,
execution errors).
* Including essential context in error logs (e.g., message hashes,
origin, destination, relevant parameters).
* Standardising log targets for easier analysis (e.g.,
`xcm::module::function_name`).
* Clarifying log messages.

This work continues #7003 and partially addresses #6119.

## Integration

Downstream projects using XCM functionalities should see improved
diagnostic logs without needing direct integration changes, as this
primarily enhances internal logging. Node operators will find new, more
detailed XCM error logs, aiding in monitoring and troubleshooting. Log
parsing scripts might need updates for new log formats.

## Review Notes

This PR enhances logging throughout XCM-related code paths, particularly
in error handling (e.g., `map_err` blocks), to improve failure
visibility.

Reviewers are encouraged to assess:
* **Clarity & Actionability:** Are logs clear, concise, and actionable
for failures?
* **Context:** Do error logs capture essential context (message hash,
origin, destination, error specifics, parameters) appropriately for
their level?
* **Log Levels:** Is the chosen log level (e.g., `error`, `warn`,
`debug`, `trace`) suitable? Are any level adjustments appropriate?
* **Targets:** Are `target:` fields (e.g., `xcm::module::function`)
consistent and specific?
* **Error Accuracy:** Do logs accurately reflect the handled error
condition?
* **Impact:** Logging should minimally affect core logic and
performance; favour simple logging of existing/easily derived data.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T6-XCM This PR/Issue is related to XCM.

Projects

Status: Done
Status: Done
Status: SDK Released - Needs Integration

Development

Successfully merging this pull request may close these issues.

[XCM] don't ignore errors

5 participants