Skip to content

chore: logging messages to use consistent placeholder names for resources #9427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Meir017
Copy link
Contributor

@Meir017 Meir017 commented May 20, 2025

Standardizes logging resource placeholder names

Updates all logging statements to use a consistent placeholder name for resources, improving clarity and maintainability in log outputs. Ensures uniformity across components and reduces potential confusion when interpreting logs.

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

…rces

Standardizes logging resource placeholder names

Updates all logging statements to use a consistent placeholder name for resources, improving clarity and maintainability in log outputs. Ensures uniformity across components and reduces potential confusion when interpreting logs.
@Copilot Copilot AI review requested due to automatic review settings May 20, 2025 18:48
@github-actions github-actions bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label May 20, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label May 20, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR standardizes logging statements by replacing the {Resource} placeholder with {ResourceName} to improve clarity and consistency in log outputs.

  • Replaced {Resource} with {ResourceName} across various logging calls.
  • Ensured uniform placeholder usage in image building, health checking, backchannel RPC, and notification services.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/Aspire.Hosting/Publishing/ResourceContainerImageBuilder.cs {Resource}{ResourceName} in build image logs
src/Aspire.Hosting/Health/ResourceHealthCheckService.cs {Resource}{ResourceName} in health check logs
src/Aspire.Hosting/Backchannel/AppHostRpcTarget.cs {Resource}{ResourceName} in endpoint logs
src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs {Name}{ResourceName} in notification logs

@Meir017
Copy link
Contributor Author

Meir017 commented May 20, 2025

Used https://github.com/Meir017/dotnet-logging-usage for initial mapping of Aspire.Hosting to see if it works, and found a few inconsistencies :)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant