SpringBoot 中使用 Log4j
来源:互联网 发布:机器人编程指令 编辑:程序博客网 时间:2024/05/21 18:43
SpringBoot 中使用 Log4j
1、pom 文件中排除 slf4j 的依赖
说明:如果你是 spring-boot-starter-web
模块的,同样地,也排除掉 slf4j 的依赖,
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
2、引入 log4j 的依赖:
- 1
- 2
- 3
- 4
- 1
- 2
- 3
- 4
3、自己测试的时候要看到日志起作用了才算。
log4j.properties 配置文件:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
今天在项目里面使用 SpringBoot 集成 log4j,具体的操作参考了下面这篇文章。
这里做一个记录。
http://www.dutycode.com/spring_boot_log4j_shiyong.html
0 0
- SpringBoot 中使用 Log4j
- SpringBoot 中使用 Log4j
- SpringBoot中使用 Log4j
- SpringBoot使用log4j
- Log4j和Log4j2的区别(SpringBoot中配置使用)
- log4j配置和springboot中Logback配置
- eclipse 使用maven 构建springboot +log4j
- SpringBoot-log4j
- springboot中使用Druid
- SpringBoot中使用redis
- SpringBoot中使用Filter
- SpringBoot 中使用JSP
- springboot中使用RestTemplate
- SpringBoot中使用ElasticJob
- springboot中使用logback
- SpringBoot中使用fastjson
- Springboot中使用缓存
- Springboot中使用定时器
- 串口接收处理思路
- Maven的pom.xml介绍
- Java类型中ParameterizedType,GenericArrayType,TypeVariabl,WildcardType详解
- 0001-atom编辑器之atom-beautify和uncrustify的安装及配置方法
- C#调试写日志
- SpringBoot 中使用 Log4j
- 【备忘】两套 Swift视频教程 完整版 下载
- 56.贝赛尔曲线初步(一)
- Oracle执行DDL语句结束后加/,打补丁把/换成GO
- 最少拦截系统
- [Leetcode] Merge Two Sorted Lists
- 购买阿里云免费https证书,配置tomcat实现https加密访问
- SSH框架中配置log4j的方法
- 房地产不良资产的形成原因