-
Notifications
You must be signed in to change notification settings - Fork 26
Improve Exception Logging in Plugin Download Extraction #551
Copy link
Copy link
Labels
C#C# related codeC# related codeenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershacktoberfest-acceptedhelp wantedExtra attention is neededExtra attention is neededrefactoringRefactoring codeRefactoring codereliability
Description
Summary
Currently, in the plugin download extraction process, the catch block logs errors like this:
File: src/FlowSynx.Infrastructure/PluginHost/Manager/PluginDownloader.cs line: 131
_logger.LogError(_localization.Get("Plugin_Download_Extraction_ErrorDuringDelete", ex.Message));Problem:
Passing only ex.Message to the logger loses the full exception context, such as stack trace and inner exceptions. This makes debugging and troubleshooting harder.
Suggested Improvement:
The caught exception should be passed as a parameter to the logger to preserve full exception details:
_logger.LogError(ex, _localization.Get("Plugin_Download_Extraction_ErrorDuringDelete", ex.Message));Benefits:
- Full exception context (stack trace, inner exceptions) is preserved.
- Easier debugging and monitoring.
- Aligns with best practices for structured logging in .NET.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C#C# related codeC# related codeenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershacktoberfest-acceptedhelp wantedExtra attention is neededExtra attention is neededrefactoringRefactoring codeRefactoring codereliability