Sim, você deveria. O uso de uma fachada de registro como SLF4J oferece flexibilidade sem sobrecarregar seus usuários com uma estrutura específica de registro em log.
Authors of widely-distributed components and libraries may code against the SLF4J interface in order to avoid imposing an logging framework on the end-user of the component or library. Thus, the end-user may choose the desired logging framework at deployment time by inserting the corresponding slf4j binding on the classpath, which may be changed later by replacing an existing binding with another on the class path and restarting the application. This approach has proven to be simple and very robust.
Além disso, se os usuários não incluírem um jar SLF4J (do guia do usuário ):
As of SLF4J version 1.6.0, if no binding is found on the class path, then slf4j-api will default to a no-operation implementation discarding all log requests.
Se você estiver preocupado com as implicações de desempenho da criação de log, confira esta esta entrada de FAQ do SLF4J . A ideia é que você forneça parâmetros para registrar instruções em vez de incluí-las em uma Sequência de Linha:
The following two lines will yield the exact same output. However, the second form will outperform the first form by a factor of at least 30, in case of a disabled logging statement.
logger.debug("The new entry is "+entry+"."); logger.debug("The new entry is {}.", entry);
O SLF4J ainda é outra fachada de registro?
SLF4J is conceptually very similar to JCL. As such, it can be thought of as yet another logging facade. However, SLF4J is much simpler in design and arguably more robust. In a nutshell, SLF4J avoid the class loader issues that plague [Jakarta Commons Logging].