Uh oh!
There was an error while loading. Please reload this page.
Support TraceSource to be initialized from the app.config file - #73087
Conversation
ghost
commented
Jul 29, 2022
Tagging subscribers to this area: @tommcdon Issue DetailsWIP
|
ghost
commented
Jul 29, 2022
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
1ce6320 to
7885a77Compareb186226 to
ba39523Compareba39523 to
ba57e1fCompareericstj
commented
Aug 4, 2022
cc @RussKie@JeremyKuhne since you're involved from Winforms side. @noahfalk was also involved from diagnostics side. |
RussKie
commented
Aug 4, 2022
Thank you. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
steveharter
commented
Aug 8, 2022
Good point - I'll add that to the description. Customers will be required to call |
noahfalk
left a comment
There was a problem hiding this comment.
This LGTM. I think our WinForms users are really going to appreciate it!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
9d815cf to
71f73e5Compare71f73e5 to
a5ac25dCompareThis reverts commit a5ac25d.
steveharter
commented
Aug 10, 2022
steveharter
commented
Aug 10, 2022
CI is green with exception of |
| internal void OnInitializing() | ||
| { | ||
| Initializing?.Invoke(null, new InitializingSwitchEventArgs(this)); | ||
| TraceUtils.VerifyAttributes(Attributes, GetSupportedAttributes(), this); |
There was a problem hiding this comment.
This call causes Winforms test to fail - dotnet/winforms#7578
danmoseley
commented
Aug 16, 2022
Do we need to do anything to help folks that are trying to port discover how to make this work? Is it sufficient to hope they find the original issue and navigate here? Should we put an example in the RC1 release post? |
RussKie
commented
Aug 16, 2022
I believe @KlausLoeffelmann was able to devise a fix, so I think we're good now. |
danmoseley
commented
Aug 16, 2022
@RussKie what I'm asking is how a customer porting to .NET Core whose code fails at runtime with something similar to
... will learn that they need to use .NET 7+ and add a call to @KlausLoeffelmann is not a typical customer. |
steveharter
commented
Nov 2, 2022
Breaking change doc: dotnet/docs#32147 |
RussKie
commented
Nov 2, 2022
@steveharter just to confirm - the fix is only in .NET 7 and it's not available in the earlier versions, right? |
Fixes#23937 (original issue)
Fixes#72967 (API)
Much of the code was ported from .NET Framework and refactored to support the three new events to allow the config system to update
TraceSourceand friends from the config file(s). Original port per @ericstj in the first commit.To enable this functionality,
TraceConfiguration.Register()must be called. This is a new API that is not present in .NET Framework.There is potentially more tests around error handling that could be added:
Switch,TraceSourceandTraceListener.initializeData.