例如我想在编译前替换:
#debug("${enclosing_method} this is debug message for " + userName)
与:
if (log.isDebugEnabled())
{
log.debug("<real method name> this is debug message for " + userName);
}
最佳答案
不要。请改用 slf4j,这样您就可以避免使用 {} 进行检查。
关于java - java中的预处理器日志记录语句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3938001/