Skip to content
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

Disable support keys if --no-logging is specified #153

Merged
merged 3 commits into from
Sep 12, 2023
Merged

Conversation

christianhelle
Copy link
Owner

Skip analytics configuration entirely if --no-logging is specified

Moved the line that configures Analytics from the Main method of the Program class to the Validate method of the GenerateCommand class. This ensures that analytics will only be configured if the 'NoLogging' setting is not active, optimizing performance and improving the user's control over logging.

Show a message regarding support keys when logging is disabled

Adjusted the way the support key is handled when the logging is disabled. Previously, the support key wasn't printed at all if the logging was off. A message specifying that the support key is unavailable when logging is disabled is printed instead. This serves to ensure that users are informed about the unavailability of the support key when logging is off rather than silently omitting it.

Moved the line that configures Analytics from the Main method of the Program class to the Validate method of the GenerateCommand class. This ensures that analytics will only be configured if the 'NoLogging' setting is not active, optimizing performance and improving the user's control over logging.
In the GenerateCommand.cs, the logging statement showing the support key has been modified.
The support key statement is now conditioned to only display when logging is enabled in settings.
This was done to provide cleaner outputs when logging is disabled.
Adjusted the way the support key is handled when the logging is disabled. Previously, the support key wasn't printed at all if the logging was off. Now, a message specifying that the support key is unavailable when logging is disabled is printed instead. This serves to ensure that users are informed about the unavailability of the support key when logging is off rather than silently omitting it.
@christianhelle christianhelle added the enhancement New feature, bug fix, or request label Sep 12, 2023
@christianhelle christianhelle self-assigned this Sep 12, 2023
@christianhelle christianhelle changed the title Disable logging and support keys upon --no-logging Disable analytics and support keys upon --no-logging Sep 12, 2023
@christianhelle christianhelle changed the title Disable analytics and support keys upon --no-logging Disable support keys if --no-logging is specified Sep 12, 2023
@sonarcloud
Copy link

sonarcloud bot commented Sep 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@christianhelle christianhelle merged commit c9aae3d into main Sep 12, 2023
744 checks passed
@christianhelle christianhelle deleted the no-logging branch September 12, 2023 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, bug fix, or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant