vy commented on code in PR #2400:
URL: https://github.com/apache/logging-log4j2/pull/2400#discussion_r1537183163


##########
log4j-api/src/main/java/org/apache/logging/log4j/spi/MessageFactory2Adapter.java:
##########
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.logging.log4j.spi;
+
+import java.util.Objects;
+import org.apache.logging.log4j.message.Message;
+import org.apache.logging.log4j.message.MessageFactory;
+import org.apache.logging.log4j.message.MessageFactory2;
+import org.apache.logging.log4j.message.SimpleMessage;
+
+/**
+ * Adapts a legacy MessageFactory to the new MessageFactory2 interface.
+ *
+ * @since 2.6

Review Comment:
   *Nit:* Could you be a little bit more attentive to the Javadoc formatting, 
please?
   ```suggestion
    * Adapts a legacy {@link MessageFactory} to the new {@link MessageFactory2} 
interface.
    *
    * @since 2.24.0
   ```



##########
log4j-api/src/main/java/org/apache/logging/log4j/spi/MessageFactory2Adapter.java:
##########
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.logging.log4j.spi;

Review Comment:
   Shouldn't this class be located in an `.internal.` package?



##########
log4j-kit/src/main/java/org/apache/logging/log4j/kit/recycler/internal/ThreadLocalRecyclerFactoryProvider.java:
##########


Review Comment:
   @ppkarwasz, in our 1-1 discussion, we mentioned a `ThreadLocalRecycler` can 
suffer constant starvation when used in combination with async. logging. That 
is, instances get allocated at the call-site thread, released at the async. 
logger thread, and effectively leaving the call-site threads always out of 
recycled instances. Due to this caveat of its design, I am inclined to drop its 
support. Those who have extreme performance requirements, can reach out to 
either using the JCTools alternative or rolling out their own recycler. Though 
99% of the users would be perfectly fine with the vanilla `QueueingRecycler` 
backed by an `ArrayBlockingQueue`.



##########
log4j-kit/src/test/java/org/apache/logging/log4j/kit/env/TestPropertyEnvironment.java:
##########


Review Comment:
   Shouldn't this class be located in a `log4j-kit-test` artifact instead? I 
know, this implies moving `log4j-kit/src/test` to `log4j-kit-test/src/test`, 
but be it, just like `log4j-core-test` and `log4j-api-test`.
   
   Could you also add some Javadoc, please?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to