Ensure TraceLogger log level is maintained property#745
Open
Youssef1313 wants to merge 2 commits intocastleproject:masterfrom
Open
Ensure TraceLogger log level is maintained property#745Youssef1313 wants to merge 2 commits intocastleproject:masterfrom
Youssef1313 wants to merge 2 commits intocastleproject:masterfrom
Conversation
Member
|
To be honest, I'm not sure there's much sense in investing any more time and work in Castle logging facilities. Seems more likely to me that we're going to deprecate them soon (see the discussion in #408, plus Jono mentioned to me recently that Windsor hasn't seen much activity in recent times... so one fewer reason for keeping logging facilities going). |
Author
|
@stakx Any expected time when they will be deprecated? And when 6.x is expected to be released? Meanwhile, this bug is causing perf issues for Moq under .NET Framework. I think the scope of the change is small enough and should be safe to get in until the deprecation happens? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The added test would fail only under .NET Framework without the production change in this PR.
Under .NET Framework, if you execute the following:
it will produce
-1(corresponding toSourceLevels.All).After
Initializegets called inTraceLoggerconstructor, the level is set as:which used to set it to Trace, even when Warning is explicitly requested.
The caching in
TraceLoggergenerally looks wrong to me though. It caches TraceSource per Name, not taking into account the fact that multipleTraceLoggermight be requested with the same name but different levels.