Skip to content

AWSTarget updated to NLog v5.2.2 for build trimming #313

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

Closed
wants to merge 2 commits into from

Conversation

snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Jun 5, 2025

NLog v5.2.2 supports build-trimming without build-warnings (enabled by default with .NET7 and newer)

@@ -29,7 +29,6 @@ public class AWSTarget : TargetWithLayout, IAWSLoggerConfig
/// </summary>
public AWSTarget()
{
this.OptimizeBufferReuse = true;
Copy link
Contributor

@GarrettBeatty GarrettBeatty Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the reason for this line change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OptimizeBufferReuse was introduced in NLog v4 as opt-in optimization. With NLog v5 then it is always enabled, and the setting has been marked as obsolete.

@GarrettBeatty GarrettBeatty changed the base branch from main to dev June 5, 2025 13:07
@GarrettBeatty
Copy link
Contributor

@snakefoot The change seems fine to me. Can you rebase your change on top of the dev branch again to only include your commit. And can you also include a change file (you can follow https://github.com/aws/aws-logging-dotnet/blob/main/CONTRIBUTING.md#adding-a-change-file-to-your-contribution-branch) for how to do that.

@GarrettBeatty GarrettBeatty requested a review from philasmar June 5, 2025 14:01
@GarrettBeatty
Copy link
Contributor

GarrettBeatty commented Jun 5, 2025

i will run our testing workflow against your pr and let you know if it passes/fails. https://github.com/aws/aws-logging-dotnet/actions/runs/15469165809

@snakefoot
Copy link
Contributor Author

Closing as replaced by #314 for the dev-branch

@snakefoot snakefoot closed this Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants