On the other hand if you use SLF4J, you can get same result in much concise format as shown below :
logger.debug("Processing trade with id: {} and symbol : {} ", id, symbol);
In SLF4J, we don't need String concatenation and don't incur cost of temporary not need String. Instead, we write log message in a template format with placeholder and supply actual value as parameters.
Read full article from Why use SLF4J over Log4J for logging in Java
No comments:
Post a Comment