Interceptor for AmbientLoggerFactory - #91
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new extension point to Uno.Extensions.LogExtensionPoint allowing hosts to intercept and potentially wrap/replace the AmbientLoggerFactory whenever an app sets it, along with a new MSTest suite validating the expected behaviors.
Changes:
- Added a configurable
RegisterFactoryInterceptor(...)hook invoked whenAmbientLoggerFactoryis set. - Updated the
AmbientLoggerFactorysetter to apply the interceptor result before storing. - Added
LogExtensionPointTestsand updated the tests project to reference the singleton logging extensions project.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Uno.Core.Tests/Uno.Core.Tests.csproj | Adds project reference needed to test the new singleton logging extension behavior. |
| src/Uno.Core.Tests/LogExtensionPointTests.cs | Introduces new tests covering interceptor registration and AmbientLoggerFactory behavior. |
| src/Uno.Core.Extensions.Logging.Singleton/LogExtensionPoint.cs | Adds interceptor API and wires it into the ambient factory setter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
Applied all changes from the review threads in commit
|
…eptor and factory Agent-Logs-Url: https://github.com/unoplatform/Uno.Core/sessions/40c9fb54-ff2a-43e8-9838-f09b4e5333ca Co-authored-by: nickrandolph <1614057+nickrandolph@users.noreply.github.com>
|
|
Add the ability to intercept when the AmbientLoggerFactory is set by an app