直接上代码:
基本格式
@Slf4j
public class xxxxx {
log.info("xxxxxxxxxxxxxxxxxxx");
}
动态输出
@Slf4j
class LogTest {
@Test
void testLog() {
String testInfo = "Free flying flowers are like dreams";
log.info("The test info is :{}", testInfo);
}
}
效果:
springboot部署@Slf4j的方式及引用:
https://blog.csdn.net/cslucifer/article/details/80953400