Comments (3)
@davemessink, very nice catch! Can you submit a PR to fix it?
I believe that calling ReusableMessage#memento()
should release the ReusableMessage
. This needs to be documented in the Javadoc and might be a compatibility break.
Your report is also important for #1194: it means that all our recyclable objects (both LogBuilder
and ReusableMessage
) must be aware of the recycling lifecycle.
from logging-log4j2.
I'm not sure I'm comfortable moving the release/recycle logic into memento(). Is that the suggestion here? Other uses of memento() are to populate the ring buffer event builder and the MutibleLogEvent. The release() call is currently outside of those blocks (it's currently called by the AbstractLogger in a try/finally block).
I see that a lot of this logic is changing in #1193, what's the suggestion on timing of my PR and that one. Should I wait and address this after that PR is merged? Or get my PR merged quickly?
from logging-log4j2.
My bad, I didn't notice the other use cases of ReusableMessage#memento()
.
#1194 will not be backported to 2.x, so a PR for 2.x is welcome.
from logging-log4j2.
Related Issues (20)
- Logger precision formats in PatternLayout do not match documentation
- Removing all keys from `ThreadContextMap` does not clear the `ThreadLocal`
- Revamp the `Configuration` page HOT 2
- Revamp the `Lookups` page
- Revamp the `Layouts` page
- Revamp the `Appenders` page HOT 1
- Revamp the `Filters` page
- Revamp the `Extending` page
- Revamp the `Plugins` page
- Create a `Troubleshooting` page
- Revamp the `Performance` page
- Revamp the `Asynchronous logging` page
- Revamp the `API` page
- Uniform handling of location and URIs HOT 1
- [MS14] Documentation revamp 1/5
- [MS15] Documentation revamp 2/5
- [MS16] Documentation revamp 3/5
- [MS17] Documentation revamp 4/5
- [MS18] Documentation revamp 5/5
- Revamp the `Web Applications` page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logging-log4j2.