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

Removed unnecessary instances and simplified LogProviders + RuntimeOptions #304

Merged
merged 2 commits into from
Dec 21, 2024

Conversation

sandrohanea
Copy link
Owner

@sandrohanea sandrohanea commented Dec 20, 2024

This pull request includes several changes to improve logging and workflow behavior. The most important changes involve replacing the LogProvider with WhisperLogger and ensuring that test result files are uploaded regardless of test success or failure.

Logging Improvements:

  • Replaced instances of LogProvider.Log with WhisperLogger.Log in CudaHelper.cs, NativeLibraryLoader.cs, and RuntimeOptions.cs to standardize logging. [1] [2] [3] [4] [5] [6] [7] [8]
  • Refactored LogProvider to be a static class and moved logging logic to a new internal WhisperLogger class. [1] [2] [3]
  • Changed the way to register loggers to LogProvider.AddLogger which now returns an IDisposable for easy cleanup instead of using events.

Workflow Enhancements:

  • Updated .github/workflows/dotnet.yml to upload trx files even if the previous step fails, ensuring test results are always available. [1] [2] [3]

Configuration Improvements:

  • Refactored RuntimeOptions from an instance-based class to a static class, simplifying the configuration of runtime options. [1] [2]

Example Update:

  • Updated the CoreML example to use the new WhisperLogger for logging.

@sandrohanea sandrohanea changed the title Removed unnecessary instances and simplified LogProviders + RuntimeOp… Removed unnecessary instances and simplified LogProviders + RuntimeOpions Dec 20, 2024
@sandrohanea sandrohanea changed the title Removed unnecessary instances and simplified LogProviders + RuntimeOpions Removed unnecessary instances and simplified LogProviders + RuntimeOptions Dec 20, 2024
@sandrohanea sandrohanea merged commit db4a246 into main Dec 21, 2024
24 checks passed
@sandrohanea sandrohanea deleted the feature/refactoring branch December 21, 2024 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant