Skip to content

Improve config provider logs #4496

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

Merged
merged 2 commits into from
Apr 15, 2025

Conversation

arturcic
Copy link
Member

This pull request includes several changes to the logging and configuration handling in the GitVersion project. The most important changes involve updating log messages for configuration file handling, adding logging functionality, and correcting file references.

Updates to log messages:

Addition of logging functionality:

Correction of file references:

Updates logging messages for configuration file loading to provide more clarity and consistency.

Now it logs when:
- Default configuration is used
- Configuration file is not found
- Configuration file is being used
@Copilot Copilot AI review requested due to automatic review settings April 15, 2025 08:53
Copy link

@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.

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • src/GitVersion.sln: Language not supported
Comments suppressed due to low confidence (2)

src/GitVersion.Configuration/ConfigurationProvider.cs:80

  • [nitpick] While logging that no configuration file was provided is useful, consider adding a brief comment or documentation to clarify why a null path is treated as a valid case rather than an error so that maintainers understand the decision-making.
this.log.Info("No configuration file found, using default configuration")

src/GitVersion.Configuration/ConfigurationProvider.cs:86

  • [nitpick] The log message for a non-existent file differs from the one for a null configuration path; consider aligning these messages or adding documentation to explain the distinct behaviors for improved clarity during troubleshooting.
this.log.Info($"Configuration file '{configFilePath}' not found")

@arturcic arturcic modified the milestones: 6.2.x, 6.x Apr 15, 2025
@arturcic arturcic changed the title Feature/config provider logs Improve config provider logs Apr 15, 2025
@arturcic arturcic modified the milestones: 6.x, 6.2.x Apr 15, 2025
@arturcic arturcic enabled auto-merge April 15, 2025 08:58
@arturcic arturcic merged commit 78b8c68 into GitTools:main Apr 15, 2025
93 checks passed
Copy link
Contributor

mergify bot commented Apr 15, 2025

Thank you @arturcic for your contribution!

@arturcic arturcic deleted the feature/configProvider-logs branch April 15, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants