springboot log4j2配置
来源:互联网 发布:matlab数组分号 编辑:程序博客网 时间:2024/05/01 01:24
1、修改pom文件
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><exclusions><!-- 发布时去除内置tomcat --><exclusion><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-tomcat</artifactId></exclusion><exclusion><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-logging</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-log4j2</artifactId></dependency>
2、加入log4j2.xml
在src/main/resources中加入配置文件,详细配置不在赘述
3、修改application.properties
logging.config=classpath:log4j2.xml
大功告成!
1 0
- springboot log4j2配置
- SpringBoot配置使用Log4j2
- SpringBoot学习(4) 配置log4j2
- SpringBoot 配置log4j2日志输出
- springboot log4j2配置,使用gradle构建
- springboot log4j2
- Log4j和Log4j2的区别(SpringBoot中配置使用)
- SpringBoot - 日志集成 Log4j2
- springboot日志体系---log4j2
- springBoot 整合log4j2
- log4j2配置
- log4j2 配置
- Log4j2配置
- log4j2配置
- log4j2配置
- log4j2配置
- SpringBoot Log4j2日志分级输出
- SpringBoot配置log4j2的JdbcAppender日志写入数据库,可定义哪些日志写入
- CodeForces 659E New Reform (DFS)
- 关于"xampp中mysql中配置问题:Unknown initial character set index '48' received from server错误解决方法"
- 知道这20个正则表达式,能让你少写1,000行代码
- OC基础数据类型-NSData
- Android 查询本地通讯录联系人的信息
- springboot log4j2配置
- 关于WebView.goBack()在有的网页无法返回的问题的解决方法
- 关于Hibernate学习记录
- LUA取整
- jquery ajax中使用jsonp的限制
- BeanUtils.copyProperties与PropertyUtils.copyProperties用法及区别(转)
- inode
- mac brew
- Method Swizzling