yybmion opened a new pull request, #3810:
URL: https://github.com/apache/logging-log4j2/pull/3810

   Implements custom `ThreadContextStack` injection capability as requested in 
#1507.
   
   Users can now inject custom `ThreadContextStack` implementations just like 
`ThreadContextMap`.
   
   ## Changes
   - **ThreadContextStackFactory**: New factory class following existing 
ThreadContextMapFactory pattern
   - **Provider class**: Extended with ThreadContextStack support while 
maintaining backward compatibility
   - **ThreadContext**: Added `NOOP_STACK` constant and updated initialization 
logic
   - **System property support**: 
`log4j2.threadContextStack=com.example.MyCustomStack`
   - **Properties file support**: Can be configured in 
`log4j2.component.properties`
   
   ## Checklist
   
   ### ✅ Required checks
   
   - [x] **License**: I confirm that my changes are submitted under the [Apache 
License, Version 2.0](https://apache.org/licenses/LICENSE-2.0).
   - [x] **Commit signatures**: All commits are signed and verifiable. (See 
[GitHub Docs on Commit Signature 
Verification](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)).
   - [x] **Code formatting**: The code is formatted according to the project’s 
style guide.
     <details>
       <summary>How to check and fix formatting</summary>
   
       - To **check** formatting: `./mvnw spotless:check`
       - To **fix** formatting: `./mvnw spotless:apply`
   
       See [the build 
instructions](https://logging.apache.org/log4j/2.x/development.html#building) 
for details.
     </details>
   - [x] **Build & Test**: I verified that the project builds and all unit 
tests pass.
     <details>
       <summary>How to build the project</summary>
   
       Run: `./mvnw verify`
   
       See [the build 
instructions](https://logging.apache.org/log4j/2.x/development.html#building) 
for details.
     </details>
   
   ### 🧪 Tests (select one)
   
   - [x] I have added or updated tests to cover my changes.
   - [ ] No additional tests are needed for this change.
   
   ### 📝 Changelog (select one)
   
   - [x] I added a changelog entry in `src/changelog/.2.x.x`. (See [Changelog 
Entry File 
Guide](https://logging.apache.org/log4j/tools/log4j-changelog.html#changelog-entry-file)).
   - [ ] This is a trivial change and does not require a changelog entry.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to