Indicate local vs. global in all logging#514
Open
asasine wants to merge 7 commits intoOpenDevicePartnership:mainfrom
Open
Indicate local vs. global in all logging#514asasine wants to merge 7 commits intoOpenDevicePartnership:mainfrom
asasine wants to merge 7 commits intoOpenDevicePartnership:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates logging statements throughout the codebase to use Display trait implementations instead of directly accessing struct field .0, ensuring consistent formatting of port and device identifiers across both local and global port contexts.
Key changes:
- Replaced direct field access (
.0) with Display formatting for LocalPortId, GlobalPortId, and DeviceId types in log messages - Added Display trait implementation for DeviceId to support the new logging format
- Updated logging statements across multiple modules including wrapper, service, driver, and example code
Reviewed Changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| type-c-service/src/wrapper/vdm.rs | Updated VDM event logging to use port Display format |
| type-c-service/src/wrapper/power.rs | Updated power-related logging to use port Display format |
| type-c-service/src/wrapper/pd.rs | Updated PD alert and status logging to use port Display format |
| type-c-service/src/wrapper/mod.rs | Updated controller and port status logging to use port/device Display format |
| type-c-service/src/wrapper/dp.rs | Updated DisplayPort status logging to use port Display format |
| type-c-service/src/wrapper/cfu.rs | Updated CFU device logging to use controller Display format |
| type-c-service/src/service/power.rs | Updated power service logging to use GlobalPortId Display format |
| type-c-service/src/service/mod.rs | Updated service event logging to use port Display format |
| type-c-service/src/driver/tps6699x.rs | Updated driver logging to use port Display format |
| examples/std/src/lib/type_c/mock_controller.rs | Updated mock controller logging to use port Display format |
| embedded-service/src/power/policy/mod.rs | Added Display trait implementation for DeviceId |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
RobertZ2011
previously approved these changes
Oct 22, 2025
Contributor
kurtjd
approved these changes
Oct 22, 2025
felipebalbi
approved these changes
Oct 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.