当前位置:网站首页>jeecgboot输出日志,@Slf4j的使用方法

jeecgboot输出日志,@Slf4j的使用方法

2022-07-01 03:17:00 三个人工作室

直接上代码:

基本格式

@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

原网站

版权声明
本文为[三个人工作室]所创,转载请带上原文链接,感谢
https://blog.csdn.net/wwppp987/article/details/125376524