-
Notifications
You must be signed in to change notification settings - Fork 657
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
Conversation
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
There was a problem hiding this 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")
Thank you @arturcic for your contribution! |
🎉 This issue has been resolved in version 6.3.0 🎉 Your GitReleaseManager bot 📦🚀 |
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:
src/GitVersion.Configuration.Tests/Configuration/ConfigurationFileLocatorTests.cs
: Updated log message expectations inNoWarnOnCustomYmlFile
andNoWarnOnCustomYmlFileOutsideRepoPath
to match "No configuration file found, using default configuration". [1] [2]src/GitVersion.Configuration.Tests/Configuration/ConfigurationProviderTests.cs
: Updated log message expectation inNoWarnOnGitVersionYmlFile
to match "Using configuration file '{filePath}'".Addition of logging functionality:
src/GitVersion.Configuration/ConfigurationFileLocator.cs
: Added log message for found configuration file inVerify
method.src/GitVersion.Configuration/ConfigurationProvider.cs
: AddedILog
dependency and corresponding log messages for configuration file handling. [1] [2] [3]Correction of file references:
src/GitVersion.sln
: Corrected the reference to.gitversion.yml
in the solution file.