8000 CallSite can hide single class type using AddCallSiteHiddenClassType by wadebaird · Pull Request #5313 · NLog/NLog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

CallSite can hide single class type using AddCallSiteHiddenClassType #5313

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

Merged
merged 8 commits into from
Mar 29, 2024

Conversation

wadebaird
Copy link
Contributor
@wadebaird wadebaird commented Aug 10, 2023
  • Waiting for NLog v5.3 (And implementation as LogManager.Setup()-extension-method.

Refactored the SkipAssembly method into a ShouldSkip method to take both Hidden assemblies and types into account. Refactored LookupAssemblyFromStackFrame method into a LookupAssembly method that takes a MethodBase for better performance, as both places that call it use the MethodBase that is retrieved at the top of the method.

Added a HiddenTypeTest that tests the functionality.

…ich types to ignore.

Refactored the SkipAssembly method into a ShouldSkip method to take both Hidden assemblies and types into account.
Refactored LookupAssemblyFromStackFrame method into a LookupAssembly method that takes a MethodBase for better performance, as both places that call it use the MethodBase that is retrieved at the top of the method.

Added a HiddenTypeTest that tests the functionality.
@welcome
Copy link
welcome bot commented Aug 10, 2023

Thanks for opening this pull request!
We will try to review this soon! Please note that pull requests with unit tests are earlier accepted 👼

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

80.0% 80.0% Coverage
0.0% 0.0% Duplication

@snakefoot snakefoot added this to the 5.3.0 milestone Mar 12, 2024
@snakefoot
Copy link
Contributor
snakefoot commented Mar 16, 2024

Thank you for the pull-request. I propose moving the AddHiddenAssembly away from NLog.LogManager. But instead redirect to these Setup-extension-methods:

NLog.LogManager.Setup().SetupLogFactory(setup => setup.AddCallSiteHiddenAssembly(hideAssembly));
NLog.LogManager.Setup().SetupLogFactory(setup => setup.AddCallSiteHiddenClassType(hideClassType));

If you could resolve the current merge-conflicts, and apply the suggested changes from #5484 then it can be merged for NLog v5.3 (Give you proper credits)

Alternative then I can merge #5484, and manually merge this pull-request after manuall fixing merge-conflicts.

@pull-request-size pull-request-size bot added size/M and removed size/L labels Mar 29, 2024
@snakefoot snakefoot changed the title #5312 Added "AddHiddenType" to LogManager class that specifies which types to ignore. Added AddCallSiteHiddenClassType to hide single class type from callsite Mar 29, 2024
@snakefoot snakefoot enabled auto-merge (squash) March 29, 2024 19:44
@snakefoot snakefoot added the enhancement Improvement on existing feature label Mar 29, 2024
Copy link

@snakefoot snakefoot merged commit bd7f49f into NLog:dev Mar 29, 2024
Copy link
welcome bot commented Mar 29, 2024

Hooray your first pull request is merged! Thanks for the contribution! Looking for more? 👼 Please check the up-for-grabs issues - thanks!
thanks!

@wadebaird
Copy link
Contributor Author

Thank you! Sorry I didn't get to your request above. Thank you so much for supporting the community!

@snakefoot snakefoot changed the title Added AddCallSiteHiddenClassType to hide single class type from callsite CallSite can hide single class type using AddCallSiteHiddenClassType Mar 30, 2024
@snakefoot
Copy link
Contributor

NLog v5.3.1 has been released, that allows you to hide specific class-type, instead of the entire assembly.

Thanks again for the contribution.

@wadebaird
Copy link
Contributor Author

Thank you for your hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement on existing feature size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0