Re: [PR] Recycler API (logging-log4j2)

2023-12-29 Thread via GitHub
vy commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1871876557 > How does Recycler ensure thread safety? > > org.apache.logging.log4j.util.Unbox,Replace the ThreadLocal in this class with Recycler? Thread-safety is a part of the recycl

Re: [PR] Recycler API (logging-log4j2)

2023-12-23 Thread via GitHub
tcmot commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1868251594 @ppkarwasz How does Recycler ensure thread safety? org.apache.logging.log4j.util.Unbox,Replace the ThreadLocal in this class with Recycler? Thanks. --

Re: [PR] Recycler API (logging-log4j2)

2023-12-21 Thread via GitHub
ppkarwasz commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1865838959 @vy, Thanks. Remark that this is just my understanding of how SPIs should work. We should probably consult with experts and write some sort of policy for future extensions

Re: [PR] Recycler API (logging-log4j2)

2023-12-21 Thread via GitHub
vy commented on code in PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1433691743 ## log4j-core/src/main/java/org/apache/logging/log4j/core/ReusableLogEvent.java: ## @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under on

Re: [PR] Recycler API (logging-log4j2)

2023-12-21 Thread via GitHub
vy commented on code in PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1433690581 ## log4j-api/src/main/java/org/apache/logging/log4j/util/QueueFactory.java: ## @@ -14,18 +14,19 @@ * See the License for the specific language governing permissions

Re: [PR] Recycler API (logging-log4j2)

2023-12-21 Thread via GitHub
vy commented on code in PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1433690403 ## log4j-api/pom.xml: ## @@ -55,5 +55,10 @@ org.osgi.resource provided + + org.jctools + jctools-core + true + Review Comm

Re: [PR] Recycler API (logging-log4j2)

2023-12-21 Thread via GitHub
vy commented on code in PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1433690132 ## log4j-api-test/src/test/java/org/apache/logging/log4j/util/StringsTest.java: ## @@ -54,15 +54,6 @@ public void testEMPTY() { assertEquals(0, Strings.EMPTY

Re: [PR] Recycler API (logging-log4j2)

2023-12-21 Thread via GitHub
vy commented on code in PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1433688251 ## log4j-1.2-api/src/main/java/org/apache/log4j/builders/layout/HtmlLayoutBuilder.java: ## @@ -78,6 +79,7 @@ public Layout parse(final PropertiesConfiguration config)

Re: [PR] Recycler API (logging-log4j2)

2023-12-20 Thread via GitHub
vy commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1865764460 > Since we are introducing new interfaces and static register classes in `log4j-api`, I think we should take some time to choose were to "hide" those classes to minimize the disruption

Re: [PR] Recycler API (logging-log4j2)

2023-11-15 Thread via GitHub
ppkarwasz commented on code in PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1393751655 ## log4j-api-test/src/test/java/org/apache/logging/log4j/util/StringsTest.java: ## @@ -54,15 +54,6 @@ public void testEMPTY() { assertEquals(0, String

Re: [PR] Recycler API (logging-log4j2)

2023-11-14 Thread via GitHub
vy merged PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401 -- 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...@lo

Re: [PR] Recycler API (logging-log4j2)

2023-10-15 Thread via GitHub
jvz commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1763515200 Besides the merge conflict, I think you should take a look at the updated DI system to see if it fits in with the lifecycles you need. -- This is an automated message from the Apache

Re: [PR] Recycler API (logging-log4j2)

2023-05-19 Thread via GitHub
vy commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1554747497 > If our DI system worked properly I might agree with you. It does not. If so, I think we should pause stacking features on top of it and first fix it. I would appreciate it if yo

Re: [PR] Recycler API (logging-log4j2)

2023-05-16 Thread via GitHub
rgoers commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1550731405 > But things have changed, in a positive way: we now have a powerful DI system. Let's put that into use! Unfortunately, the DI system as it is today is broken. I discovered this

Re: [PR] Recycler API (logging-log4j2)

2023-05-16 Thread via GitHub
vy commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1550194311 ## Dependency Injection (DI) vs Static Registries > Also, saying static registries are a problem flies in the face that Log4j has a ServiceRegistry, PropertiesUtil (the PropertyRe

Re: [PR] Recycler API (logging-log4j2)

2023-05-15 Thread via GitHub
jvz commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1548264841 That pattern Ralph describes is how resilience4j works. Check out https://resilience4j.readme.io/docs -- This is an automated message from the Apache Git Service. To respond to the m

Re: [PR] Recycler API (logging-log4j2)

2023-05-15 Thread via GitHub
rgoers commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1548085067 I am thinking of when Scoped Variables come into play. Or if thread inheritance is required. don't want to have to go into the code and change the "name" passed to the factory. Inst

Re: [PR] Recycler API (logging-log4j2)

2023-05-15 Thread via GitHub
vy commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1547545535 Thanks for taking time to share your feedback @rgoers, much appreciated! :bow: > I was actually looking for this today as I will be needing to add another ThreadLocal (as much as

Re: [PR] Recycler API (logging-log4j2)

2023-05-07 Thread via GitHub
rgoers commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1537341864 I was actually looking for this today as I will be needing to add another ThreadLocal (as much as I really don't want to). But in looking at this PR again I do have some concerns ab

Re: [PR] Recycler API (logging-log4j2)

2023-04-24 Thread via GitHub
vy commented on PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#issuecomment-1520797593 h3. Progress report I am done with code changes. I will proceed with the documentation update. `garbagefree.adoc` needs to be refactored (contains either outdated or incorrect in

Re: [PR] Recycler API (logging-log4j2)

2023-04-24 Thread via GitHub
vy commented on code in PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1175759925 ## log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java: ## @@ -2762,12 +2746,8 @@ public LogBuilder atLevel(final Level level) { * @since 2

Re: [PR] Recycler API (logging-log4j2)

2023-04-22 Thread via GitHub
ppkarwasz commented on code in PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1174461445 ## log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java: ## @@ -2762,12 +2746,8 @@ public LogBuilder atLevel(final Level level) { * @

Re: [PR] Recycler API (logging-log4j2)

2023-04-22 Thread via GitHub
ppkarwasz commented on code in PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1174447095 ## log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java: ## @@ -2762,12 +2746,8 @@ public LogBuilder atLevel(final Level level) { * @

Re: [PR] Recycler API (logging-log4j2)

2023-04-21 Thread via GitHub
vy commented on code in PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1173939775 ## log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java: ## @@ -2762,12 +2746,8 @@ public LogBuilder atLevel(final Level level) { * @since 2

Re: [PR] Recycler API (logging-log4j2)

2023-04-17 Thread via GitHub
ppkarwasz commented on code in PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1168564182 ## log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java: ## @@ -2762,12 +2746,8 @@ public LogBuilder atLevel(final Level level) { * @

Re: [PR] Recycler API (logging-log4j2)

2023-03-29 Thread via GitHub
jvz commented on code in PR #1401: URL: https://github.com/apache/logging-log4j2/pull/1401#discussion_r1152172344 ## log4j-1.2-api/src/test/java/org/apache/log4j/layout/Log4j1SyslogLayoutTest.java: ## @@ -71,15 +72,18 @@ static Stream configurations() { public void testSimp

[PR] Recycler API (logging-log4j2)

2023-03-29 Thread via GitHub
vy opened a new pull request, #1401: URL: https://github.com/apache/logging-log4j2/pull/1401 This work moves `Recycler` et al. from `log4j-layout-template-json` to `log4j-api` and replaces `ThreadLocal` usages with `Recycler`s wherever possible. (It is based on @jvz's draft in #1194.)