-
Notifications
You must be signed in to change notification settings - Fork 133
AWSTarget updated to NLog v5.2.2 for build trimming #314
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
base: dev
Are you sure you want to change the base?
Conversation
i ran the branch in the pipeline but looks like this test is failing. are you able to take a look? |
Yes NLog v5 introduced a breaking change when using NLog filters, because users was often confused that filters had no effect: See also: LoggingRule Filters DefaultAction changed to FilterResult.Ignore |
looks like there is a couple more errors. My only concern with this change if users of aws logging dotnet will have to make any changes on their end to make things work with the new version of nlog. ill have to test manually as well to verify. Edit: I tested manually with the sampleapps and didnt notice any major issues. I can see logs being printed out and still sent to aws cloudwatch @philasmar is there anything else we should be looking for? |
This looks like log4net and not NLog:
NLog v5 includes a few major breaking changes, where the "worst" one is the change in NLog Filter-default-behavior. And the other one is that NLog extensions must to explicitly loaded: <extensions>
<add assembly="NLog.AWS.Logger" />
</extensions> |
@philasmar @normj can you review this? I wasn't sure if we need to make the change a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you able to add some NativeAOT tests for the trimming support you added?
NativeAOT is not supported by NLog v5, but planning to include AOT-support with NLog v6: Notice build-trimming and NativeAOT are two different features. |
"Projects": [ | ||
{ | ||
"Name": "NLog.AWS.Logger", | ||
"Type": "Major", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ive updated this to be major
as per @normj
NLog v5.2.2 supports build-trimming without build-warnings (enabled by default with .NET7 and newer)
NLog v5.2.2 was released 7th April 2023, so little over 2 years old.
See also: #225