ppkarwasz commented on issue #4697:
URL: https://github.com/apache/eventmesh/issues/4697#issuecomment-1872545665

   I am still convinced that Log4j API provides the best of both approaches. 
Using [`Logger#debug(String, 
Supplier...)`](https://logging.apache.org/log4j/2.x/javadoc/log4j-api/org/apache/logging/log4j/Logger.html#debug(java.lang.String,org.apache.logging.log4j.util.Supplier...))
 you can write the above example as:
   
   ```java
   log.debug("A time-consuming method: {}", () -> myMethod());
   ```
   
   There is not need for `LogUtils` nor the fluent API. This is available since 
Log4j API 2.4, so precedes SLF4J 2.x by several years.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to