【发布时间】:2021-12-22 23:13:53
【问题描述】:
@Slf4j
public class LogGenerator {
public void testLog() {
String customVariable1 = "Hello";
String customVariable2 = "World";
log.info("LogGenerator::testLog, customVariable1 : {}, customVariable2 : {}", customVariable1, customVariable2);
}
}
有没有办法使用 Live Template 热键生成日志语句?
【问题讨论】:
-
您需要将变量传递给日志语句吗?你能显示预期的结果吗?
-
@y.bedrov 日志将是“LogGenerator::testLog, customVariable1 : Hello, customVariable2 : World”
-
抱歉,您能否提供之前/之后的示例来澄清问题?
标签: java android-studio intellij-idea jetbrains-ide intellij-14