chore: Fix Service override on decorator #704
Merged
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.
Issue number: #702
Summary
Changes
Modified the logger provider initialization, adding new test classes and methods, and updating test setups for better organization and functionality.
Logger provider initialization:
libraries/src/AWS.Lambda.Powertools.Logging/Internal/LoggingAspect.cs
: Changed the logger provider initialization to always create a new instance ofLoggerProvider
.Test enhancements:
libraries/tests/AWS.Lambda.Powertools.Logging.Tests/Attributes/LoggingAttributeTest.cs
: Added new test classServiceTests
to verify service name overrides and included additional environment variable cleanup inDispose
methods.libraries/tests/AWS.Lambda.Powertools.Logging.Tests/Handlers/TestHandlers.cs
: IntroducedTestServiceHandler
class with methods to log service names based on environment variables and attributes.libraries/tests/AWS.Lambda.Powertools.Logging.Tests/PowertoolsLoggerTest.cs
: Added environment variable preservation and reset in tests, and updated collection attribute for sequential test execution. [1] [2] [3]Test setup improvements:
libraries/tests/AWS.Lambda.Powertools.Logging.Tests/TestSetup.cs
: AddedDisplayNameOrderer
class to order test collections by display name and included necessary using directives.Minor updates:
libraries/tests/e2e/functions/core/logging/Function/test/Function.Tests/FunctionTests.cs
: Enabled an additional inline data test for ARM architecture in AOT function tests.User experience
Checklist
Please leave checklist items unchecked if they do not apply to your change.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.