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

Removing some Error meesages that are user based #2223

Merged
merged 6 commits into from
Jul 29, 2024

Conversation

MrHinsh
Copy link
Member

@MrHinsh MrHinsh commented Jul 29, 2024

This PR should remove some common user errors from the logging.

…: refactor telemetry handling and improve logging configuration

Refactor the telemetry handling to allow disabling telemetry via settings. This change introduces a new `IServiceProvider` dependency to `CommandBase` and `ExecuteMigrationCommand` to access `TelemetryConfiguration`. The telemetry note now reflects whether telemetry is disabled based on user settings. Additionally, improve logging configuration by commenting out unnecessary exclusions to ensure comprehensive logging. This refactor enhances flexibility and transparency in telemetry and logging.
…failure

The log message is updated to provide more context, indicating that the folder should be cleaned up at the end. This helps in understanding the impact of the failure and sets the expectation for future cleanup. The telemetry tracking of the exception is removed, possibly to reduce noise in the telemetry data or because it is deemed unnecessary for this specific case.
Corrects a typo in the log message from "cleanned" to "cleaned" to improve readability and professionalism in the codebase.
♻️ (MigrationToolHost): refine logging configuration and error handling
♻️ (StartupService): improve logging and error tracking

Update the documentation to reflect the latest branch and commit details. Refactor the logging configuration in `MigrationToolHost.cs` to exclude specific sources and improve error handling by using `Environment.Exit(-1)` for missing config files. Enhance `StartupService.cs` by removing redundant log messages, adding error logging for application exit codes, and tracking unhandled exceptions with telemetry. These changes improve code readability, maintainability, and error tracking.
The change replaces the `InvalidOperationException` with a critical log message and an immediate exit using `Environment.Exit(-1)`. This ensures that the application logs the error more clearly and terminates gracefully, providing better feedback and control over the application's behavior in case of a critical failure.
…all in exception handling

The Telemetry.TrackException call is removed because it is redundant and does not provide additional value in this context. The exception is already logged with Log.LogDebug, which is sufficient for debugging purposes.
@github-actions github-actions bot added enhancement documentation This is an item for a Documentation enhancement enhancement-modern feature labels Jul 29, 2024
@MrHinsh MrHinsh marked this pull request as ready for review July 29, 2024 08:45
@MrHinsh MrHinsh enabled auto-merge July 29, 2024 08:45
@MrHinsh MrHinsh merged commit 86fba5d into main Jul 29, 2024
9 checks passed
@MrHinsh MrHinsh deleted the feature/generall-cleanup branch July 29, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is an item for a Documentation enhancement enhancement enhancement-modern feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant