ppkarwasz commented on code in PR #4698:
URL: https://github.com/apache/eventmesh/pull/4698#discussion_r1438503722


##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/file/WatchFileManager.java:
##########
@@ -62,10 +60,10 @@ private static void shutdown() {
             return;
         }
 
-        LogUtils.info(log, "[WatchFileManager] start close");
+        log.atInfo().log("[WatchFileManager] start close");

Review Comment:
   > There are many places where the usage of `ifDebugEnabled` is a remnant 
from the log4j era, which can be replaced with `log.debug()` from slf4j. 
However, in many cases, removing the `ifDebugEnabled` directly would result in 
a performance decrease.
   
   To be precise it is a remnant of the Log4j 1.x/JCL era. Since the release of 
SLF4J in 2005 these guards are not necessary. The Log4j 2.x API (2014) works 
the same way as SLF4J.
   
   > 2.
   > That requires obtaining the Fully Qualified Class Name (FQCN) of each 
class and passing it as a parameter to LogUtils, which is not a good approach 
for us.
   
   Probably my explanations were not clear. The FQCN to use is that of the 
`LogUtils` class, i.e. "org.apache.eventmesh.common.utils.LogUtils". The 
logging backend will look into the stack for the class that **called** 
`LogUtils`.



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